I am not an expert in allocators. However, feel free to use my dcollections chunk allocator and related API.
I just implemented what I thought would be good. I handle the free individual elements question by a freeNeeded enum. The freeAll I figure can be a noop for allocators that don't care, since it's not called frequently. freeNeeded could potentially be an external template instead of an internal enum. I wrote that code long before I was using d2 and had experience with Andrei's excellent type checking code. http://www.dsource.org/projects/dcollections/browser/branches/d2/dcollections/DefaultAllocator.d Anyways, use what you want. It's boost 1.0 license. -Steve ----- Original Message ---- > From: Andrei Alexandrescu <[email protected]> > > On 10/23/10 18:38 CDT, David Simcha wrote: > > > > Ok. First, I'll start off by stating that I don't have much knowledge of > > how custom allocators work in C++. I know that they're template > > parameters to STL containers, but that's about it. I don't know many > > details. > > Probably you're better off making good judgments than I am; I know about STL >allocators, I also know they are wrong, but I can't figure why. _______________________________________________ phobos mailing list [email protected] http://lists.puremagic.com/mailman/listinfo/phobos
