This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Less good ;-) results from Rittle's string allocator


On Tue, Nov 27, 2001 at 09:00:52PM +0100, Paolo Carlini wrote:
> Phil Edwards wrote:
> > Let me throw out an idea I had while typing the last paragraph:  we could
> > make the _MAX_BYTES a template parameter of the allocator:
> >
> >  old:      __default_alloc_template<true,0>
> >  new:      __default_alloc_template<true,0, _MAX_BYTES=256>
> >
> > or something similar.  Then basic_string can have its own memory pool.
> 
> First blush this looks like a very nice idea!

Thanks.  I wonder whether it would be useful.


> Unfortunately, however, it is not that easy: among other things _MAX_BYTES is currently
> declared *private*... grrrrr

Loren and I are about to rewrite stl_alloc.h from scratch -- okay, just
kidding, but the diff eventually posted will look like it.  Once stl_alloc
and stl_threads have been cleaned up, and I've checked in the documentation
for the allocators, then we can all help redesign it.  :-)

Phil

-- 
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace.  We seek
not your counsel, nor your arms.  Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen.            - Samuel Adams


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]