Pointer top 16 bits use

Benjamin Thaut via Digitalmars-d digitalmars-d at puremagic.com
Fri May 6 23:59:03 PDT 2016


On Saturday, 7 May 2016 at 06:08:01 UTC, Nicholas Wilson wrote:
> In Dicebot's DConf talk he mentioned that it is possible to use 
> the top 16 bits for tagging pointers and the associated risks.
>
> Regarding the GC not seeing a pointer if the top 16 bits are 
> used, whats to stop us from changing the GC to (or adding an 
> option to) ignore those bits when checking?
>
> I imagine that it would cause a lot more false pointers, but 
> when we get precise GC that problem would go away.

The problem with this is, that its not future proof. Once the top 
16-bits of a pointer get used D programs will suddenly stop 
working. So i think we shouldn't support that officially. If you 
really want to do that you can simply hack the scan routine of 
the gc in druntime yourself and ship with the hacked version.


More information about the Digitalmars-d mailing list