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

Re: Senora GC ?



Quoting "Ji-Yong D. Chung":
>     Does this mean the registered location cannot be on
> stack, but must be on heap that is not deleted?

The location must be permanent, which usually means the heap...

>     If it is on stack, it must outlast the lifetime
> of the garbage collector, right?  Otherwise,
> woudn't it try to delete the location (which may
> not exist)?

... but a location on the stack that lives forever (as far as the GC is
concerned) would be ok.

Of course, a stack location is likely to be covered by
GC_set_stack_base(). But I can imagine a situation where startup code
allocates a record on the stack before the GC-using code is called, and
the stack record eventually contains a pointer to GCable values.

Matthew