Allocators in Phobos
dsimcha
dsimcha at yahoo.com
Mon Aug 22 17:24:32 PDT 2011
On 8/22/2011 4:21 PM, Andrei Alexandrescu wrote:
> On 8/19/11 10:33 PM, David Simcha wrote:
>> Are there any other allocators that might be useful and could
>> reasonably be
>> implemented as Phobos modules without major modifications to druntime
>> or the
>> compiler?
>
> We need to have a classic heap allocator that we can combine with
> regions. See Emery Berger's HeapLayers and reap data structure.
>
> Andrei
I've read up on reaps a little. It sounds like a pretty interesting
concept. Since I'm hoping RegionAllocator will get its turn in the
review queue soon and implementing a good heap is fairly involved, a
reap isn't going to be part of my initial proposal. (Dimity's and
Cristi's GSoC projects are both Phobos candidates and both already
depend on RegionAllocator, so we should probably get it in Phobos soon.
As a short term solution, both are just keeping a copy of it in their
source trees.) However, when RegionAllocator is reviewed, we should
make sure there are no bad design decisions that would make implementing
a reap on top of it unnecessarily difficult.
Bottom like: Longer term, a reap definitely does belong in Phobos and
we should plan accordingly, but it should be a separate, later proposal.
More information about the Digitalmars-d
mailing list