I'm new and wanting to help!
Joel Dice
dicej@mailsnare.net
Thu Aug 3 15:31:00 GMT 2006
On Wed, 2 Aug 2006, Tom Tromey wrote:
> * The holy grail would be to allow a copying GC somehow.
> We think this is very, very hard.
This is a topic near to my heart, since I'm implementing a Lisp
interpreter using a copying GC. The challenge is to accurately identify
where the pointers are on the stack. In my case, I maintain a
thread-local linked list of pointer addresses, but this must be done
manually and is obviously error-prone. If GCC could do this (or the
equivalent) automatically in a language-independent way, it would be a
huge help for all front ends, VMs, and interpreters needing accurate GC.
Would it be possible to use debug information to determine the stack
layout, similar to how DWARF is used for unwinding? I suppose this would
only work as long as you never stored a pointer to GC-able data in
something that's not declared to be a pointer (ex. long foo =
reinterpret_cast<long>(&bar);).
Also, how might java.util.IdentityHashMap or the hash-synchronization
option be implemented when using a copying GC, given that object addresses
may change at any time?
- Joel
More information about the Java
mailing list