Sun SPOT API
Green Release  


com.sun.squawk
Class Lisp2GenerationalCollector

java.lang.Object
  extended by com.sun.squawk.GarbageCollector
      extended by com.sun.squawk.Lisp2GenerationalCollector
All Implemented Interfaces:
com.sun.squawk.pragma.GlobalStaticFields

public final class Lisp2GenerationalCollector
extends GarbageCollector

Collector based on the lisp 2 algorithm described in "Garbage Collection : Algorithms for Automatic Dynamic Memory Management" by Richard Jones, Rafael Lins. For objects that move during a collection, forwarding offsets are installed in high bits of the class word in the object's header. The class pointer is made relative to the space in which the class lies (i.e. ROM, NVM or RAM) and this offset is stored in the lower bits. the two lowest bits of the class word are used as a determine if the object has forwarded ('00' if not) and if so, where is the class located ('01' in the heap, '11' in NVM and '10' in ROM). The forwarding offset is relative to the start of a "slice" with the absolute offset of the slice stored in a fixed size "slice offset table".


       <-------------- (W-C-2) ---------> <------ C ------> <-2->
      +----------------------------------+-----------------+-----+
      |  forwarding offset               | class offset    | tag |
      +----------------------------------+-----------------+-----+
       <--------------------------- w -------------------------->
                                          <-- sliceOffsetShift ->
 

Author:
Doug Simon, Nik Shaylor, Andrew Crouch

Field Summary
 
Fields inherited from class com.sun.squawk.GarbageCollector
finalizers, references
 
Method Summary
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 


Sun SPOT API
Green Release  


Copyright © 2006 Sun Microsystems, Inc. All Rights Reserved.