Steve Fink wrote:

I propose that we have configure probes for the variations that we can
support, but have everything else (including miniparrot) fall back to
a registration scheme. In other words, whenever you allocate a
collectible pointer and don't immediately anchor it to something, you
have to pass it to a PIN_POBJ(p) macro, and once it's anchored, you
call RELEASE_POBJ(p).

Just setting the live bit on new PObjs would be enough IMHO. We are currently running with --gc-debug, which collects dead PObjs on each allocation.

When the live_FLAG is set on get_free_xx() it will not be collected in the next GC run - which will occur some 1000 allocations later. The rule is, you have to anchor the PObj in the meantime.

So, without --gc-debug, above proposal should be safe, when we know that we don't construct 1000 array elements w/o anchoring the array first.

leo

Reply via email to