Subject: Re: [boost] Regex allocator support
From: Jeffrey Hellrung (jhellrung_at_[hidden])
Date: 2009-12-02 15:46:39
Fred Sundvik wrote:
> We recently had to use the regular expression library in conditions
> where there was no available physical memory, for reporting resource
> consumption when our console game runs out of memory. This wasn't
> possible however due to the fact that the basic_regex does some dynamic
> allocations and doesn't provide any allocator specialization, allthough
> match_results for example does. So we modified the boost code a little
> bit and added a new template paramter for the allocator, and made
> constructors that takes allocators as parameters.
> So my question is, what are the chances that theese kinds of
> modificiations gets implemented in the actual library, and possibly in
> the next c++ standard library as well? I consider it a quite big design
> flaw to not have any control of the internal allocations, so for me this
> a quite big thing.
+1; I agree with the OP's sentiments, though I wouldn't say it's
necessarily a "big" design flaw. However, I've never used the
Boost.Regex library, and I don't know if the next standard specifies
allocator parameters. I gather it doesn't?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk