[Gc] Determining if pointer GC allocated
haberg-1 at telia.com
Wed Dec 21 03:53:06 PST 2011
On 21 Dec 2011, at 01:35, Henning Makholm wrote:
>> Is there a function to check if a pointer has been allocated by the
>> GC? That is, something like
>> bool is_on_heap(void* p);
>> that returns true exactly when p has been allocated by the GC.
>> And would such a function be time consuming?
> Check whether GC_base(p) returns 0.
Thanks! I saw this function, but did not realize it could be used.
How time-consuming is this call?
More information about the Gc