This is the mail archive of the java-discuss@sourceware.cygnus.com mailing list for the GCJ project. See the GCJ home page for more information.
Godmar> My question is more concerned with what you do when your Godmar> compiler creates type maps (information that says what machine Godmar> state, including stack state refers to which objects). Then, Godmar> it is often so that this information is not available for Godmar> every instruction, but only a subset of instructions. Ok, I didn't understand your question originally. Our use of the Boehm collector is not fully conservative. We use the compiler-generated type info to do precise marking of the heap. So if I understand you correctly, we could see this problem if we use a preemptive thread system. As I understand it (which is perhaps less than I should), the Boehm collector has an allocation lock that it acquires when allocating new objects. This lock prevents GC from running during these critical sections. So one solution is to modify the allocator to always initialize the vtbl of a new object to NULL, and then have the mark function recognize this as a special case. This works because we know that an object without a vtbl hasn't yet been initialized and therefore can't hold any pointers. Right now, we just ignore this problem. Dealing with it is on my list of things to do. Does this answer your question? Or am I still misunderstanding? Tom