std.allocator: false pointers

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Fri May 2 11:42:52 PDT 2014


On 5/2/14, 11:07 AM, Steven Schveighoffer wrote:
> On Fri, 02 May 2014 14:00:18 -0400, Andrei Alexandrescu
> <SeeWebsiteForEmail at erdani.org> wrote:
>
>> On 5/2/14, 10:33 AM, Steven Schveighoffer wrote:
>>> On Fri, 02 May 2014 13:26:41 -0400, Steven Schveighoffer
>>> <schveiguy at yahoo.com> wrote:
>>>
>>>> Why not keep the 3 states, but just treat unmarked blocks as free?
>>>> Then the next time you go through tracing, change the bit to free if
>>>> it was already marked.
>>>
>>> Sorry, if it was already *unmarked* (or marked as garbage).
>>
>> Yah, understood. Unfortunately I just realized that would require
>> either to keep the bits together or to scan two memory areas when
>> trying to allocate, both of which have disadvantages. Well, I guess
>> I'll go with the post-tracing pass. -- Andrei
>
> What is the problem with keeping the bits together?

More implementation (I have a BitVector type but not a KBitsVector!k 
type), and scanning can't be done with fast primitives. -- Andrei



More information about the Digitalmars-d mailing list