Red-Black tree storing color without additional memory requirements

Ellery Newcomer ellery-newcomer at utulsa.edu
Wed Nov 20 17:17:13 PST 2013


On 11/20/2013 06:50 AM, bearophile wrote:
> safety0ff:
>
>> Since the GC supports interior pointers, I think you can justify using
>> the least significant bits as long as the size and alignment of the
>> pointed object guarantee that the pointer + tag will always lie inside
>> the memory block.
>
> From:
> http://dlang.org/garbage.html
>
>> Do not take advantage of alignment of pointers to store bit flags in
>> the low order bits:
>
> Bye,
> bearophile

ha. I did this with steve's rb tree. hasn't bit me yet.


More information about the Digitalmars-d-learn mailing list