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: trimming STL's memory pool


> I was always of the opinion that the default allocator in libstdc++
> shouldn't do anything special and just use malloc.  Provide special
> allocators for situations where the user knows what s/he is doing and
> can embed knowledge about the allocation needs in the program.  And
> don't even think for a second to use brk() in the libstdc++ allocator:
> this is doomed from the get go, there can only be one direct user of the
> heap.

FYI new_allocator has been the default underlying std::allocator since
3.4.0. I'm inclined to keep it so, for the reasons you suggest, and
others.

At this point, there are various higher-performing-if-that-is-what-is-
desired allocators. It is trivial, and documented, how to configure
sources to use them.

For people using 4.0.0, and wishing a configurable, high-performance
pooled allocator, I suggest __mt_alloc.

-benjamin


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