This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: Proposal for a Guile binary file format
- To: Mikael Djurfeldt <djurfeldt at nada dot kth dot se>
- Subject: Re: Proposal for a Guile binary file format
- From: Mikael Djurfeldt <mdj at mdj dot nada dot kth dot se>
- Date: 21 Nov 1999 12:41:52 +0100
- Cc: guile at sourceware dot cygnus dot com
- Cc: djurfeldt at nada dot kth dot se
- References: <199911180022.BAA04193@thalamus.nada.kth.se>
Mikael Djurfeldt <mdj@thalamus.nada.kth.se> writes:
> When copying a cell, a "broken heart", that is the address of the
> new cell, is stored in the CAR of the old cell so that the
> relocation process can find it.
Emails have prompted me to clearify why I wrote "broken heart":
This is a technical term used in copying garbage collectors. A
copying GC works by traversing the linked structure of cons cells and
other objects and copying every object it encounters to a new heap.
When objects are thus relocated, one obviously has to modify pointers
to point to the new address of the object. But, how are we going to
find the new address of a relocated object B pointed to by the object
A being relocated just now? A pointer, a "broken heart", is left in
the old object, so that one first finds the old B using the old
pointer in A, and then finds new B using the "broken heart".