[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GC and stack marking

From: Florian Weimer
Subject: Re: GC and stack marking
Date: Sat, 31 May 2014 08:31:10 +0200

* Stefan Monnier:

> The Boehm's GC has developed ways to do this second option
> automatically: if during a GC, a memory cell is found to "point to"
> unallocated memory, then it is assumed to be of non-pointer type and
> this fact is recorded somewhere so that if in subsequent GC's this cell
> ends up "pointing" to allocated memory that won't be considered as an
> actual pointer.

I believe this is not a correct description of the mechanism.  What
happens is that the pointer *target* is blacklisted and not used for
allocation.  What you propose instead is not safe because it will
result in dangling pointers in some cases.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]