Boost logo

Boost :

From: Greg Colvin (gcolvin_at_[hidden])
Date: 2000-09-19 12:00:17


Does the regex allocator ultimately call the global operator new function?

Can your garbage collector replace this function?

From: Sibylle Schupp <schupp_at_[hidden]>
>
> > However the allocator parameter here just kind of gets in the way. I put
> > it in place because the class does allocate memory, however in the long
> run
> > I feel that this would be better managed by its own internal memory
> manager
>
> Three thoughts:
> 1. Even if the memory manager is tailored for this particular class I would
> encapsulate
> it in a separate component that is orthogonal to the rest of the class
> parameters.
> I would then need an allocation parameter to bind this component.
> 2. Without allocation parameter there is no way to override an internal
> design decision. What if the internal memory handler optimizes for speed
> while a user is
> more interested in space efficiency?
> 3. We are developing a garbage collector for class templates and in fact
> were planning
> on using regex as (another) example to study when garbage collection
> improves computation times. Although we haven't really worked with regex
> yet, I expect there
> will be problems if we bind the allocator at the user's level (in
> instances of list or string classes
> in the main program) to the garbage collector, but cannot propagate this
> binding "all the way down."
> For example references from one heap to the other---the garbage-collected
> one and the
> one of the internal manager---will be difficult to handle. I would also
> expect that the total
> memory overhead increases the more allocators are involved.
>
> Sibylle
>
> (schupp_at_[hidden])
>
>
>
>
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk