On Thu, 17 Apr 2014 10:52:19 -0400, Timon Gehr <timon.g...@gmx.ch> wrote:

On 04/17/2014 08:55 AM, Manu via Digitalmars-d wrote:

If an API
could be provided in druntime, it may be used by GC's, ARC, allocators,
or systems that operate at the barrier between languages.


There already is.

bool isGCPointer(void* ptr){
     import core.memory;
     return !!GC.addrOf(ptr);
}

I don't think this is a viable mechanism to check pointers. It's too slow.

-Steve

Reply via email to