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: gcc 3.x custom allocators


> >  All I really want to do is hook into allocate and deallocate to use my
> >custom allocator. I've been reading libstdc++ docs and stl_alloc.h, but
> >so far, I just don't get it. Plus I gather this is all gonna change again 
> >soon ?

For values of "soon" including "as soon as Phil gets around to it"... but
it's not going to change so much that you can't write a custom allocator.

The goal of my (eventual, pseudo-mythical) rewrite is to make maintenance of
library allocators easier, and allow the users to easily tweak parameters
of library allocators.  Writing a custom allocator from scratch should
already be possible without knowledge of the library's internals.  If not,
that's a bug.

(If you're familiar with "policy classes" in templates, that's my plan.)


> I thought the only change was the removal of the "reallocate" member.

As far as I can remember, that's all.


Phil

-- 
I would therefore like to posit that computing's central challenge, viz. "How
not to make a mess of it," has /not/ been met.
                                                 - Edsger Dijkstra, 1930-2002


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