On 2014-05-27 3:56 AM, "Ola Fosheim Grøstad" <ola.fosheim.grostad+dl...@gmail.com>" wrote:
On 64 bit platform 8 bytes is sufficient if you control the allocator:

1. Avoid allocating non-GC memory from specific address range.
2. Set a max-size for GC allocated objects.

Then the test becomes this:

if ((ptr & NONGCMASK)==0){
    heapinfo_ptr = ptr&MASK;

   // process ptr
}

That's true, though you still need the thread ID for references to pointers and you need to be able to pass those pointers to C.

If that's done manually, you end up sanitizing the pointers too often, it becomes boilerplate.

Reply via email to