Kaffe stack bounds checks

golubovsky at altavista.net golubovsky at altavista.net
Mon Aug 23 22:36:52 PDT 1999



On 23 Aug 1999, Stefan Burstroem wrote:

>
>In article <Pine.LNX.4.05.9908230901580.83-100000 at dmgtest.local> you wrote:
>>clone(). Therefore we have stacks separated by OS, and this is OS
>>responsibility to reallocate them and protect them. I couldn't find in the
>>JVM specification any reason to have possibility of reference from one
>>process (thread) to another process' stack.
>
>How do you handle GC using this method? The GC thread needs to be able to
>walk all other thread stacks.
>

GC is still an open problem for me. However I suppose that if we need to walk
other threads stacks just to find references to collectable objects there,
there may be a workaround I currently use. If a reference to an object
(instance or array) is involved in some method as a local variable or
parameter or return value, its references counter increments upon method entry
and decrements upon method exit (more exactly: frame creation and frame
discard time). I couldn't find in the JVM specification when do Java threads
need to reference local variables of another threads.

Dmitry M. Golubovsky
      St-Petersburg, Russia





More information about the kaffe mailing list