RedBlackTree with Array Store
Steven Schveighoffer
schveiguy at yahoo.com
Sat Jan 15 09:20:38 PST 2011
On Fri, 14 Jan 2011 20:57:18 -0500, %u <wfunction at hotmail.com> wrote:
>> Didn't look at your code exactly, but from reading this discussion,
>> what you
> have implemented is basically a memory pool ;)
>
> Huh, interesting... I didn't think about it that way, but in a way,
> that's true.
> :) I just thought of it as some tree representation that did not use
> pointers.
>
>
>> Yes it's possible, and dcollections does this. in our discussions on
>> bringing
> dcollections' red black tree to std.container, I asked if my custom
> allocator that
> uses an array for storage should be ported or not, and we decided to
> defer custom
> allocation until later. I fully expect that a custom allocation scheme
> will be
> introduced at some point in std.container.
>
> Oh cool! So long as it's on the (probably very long!) to-do list, that's
> great.
> Thanks for letting me know. :]
>
> (By the way, if I happen to find enough time to modify the current
> version to
> allow for a custom allocator, would that be potentially of any use?)
Sure, in fact you could currently use dcollections to test it, since it
allows for custom allocators ;)
-Steve
More information about the Digitalmars-d
mailing list