| java.lang.Object gov.nasa.jpf.jvm.Area gov.nasa.jpf.jvm.DynamicArea
DynamicArea | public class DynamicArea extends Area (Code) | | DynamicArea is the heap, i.e. the area were all objects created by NEW
insn live. Hence the garbage collection mechanism resides here
|
Method Summary | |
public void | analyzeHeap(boolean sweep) Our precise mark & sweep garbage collector. | void | checkWeakRefs() | ElementInfo | createElementInfo() | public void | gc() | public ElementInfo | get(int index) | public static DynamicArea | getHeap() | public boolean | getOutOfMemory() | public static void | init(Config config) | void | initGc() | public boolean | isSchedulingRelevantObject(int objRef) | public boolean | isStatic() | public Vector | linearize(int objref, Vector result) | public Vector | linearizeRoot(int objref) | public Vector | linearizeRoot(int objref, PredicateMap obj) | public void | log() | void | logMark(FieldInfo fi, ElementInfo ei, int tid, int attrMask) | void | markPinnedDown(int objref) | void | markRecursive(int objref) recursive attribute propagating marker, used to traverse the object graph
(it's here so that we can pass in gc-local data into the ElementInfo
methods). | void | markRecursive(int objref, int refTid, int refAttr, int attrMask, FieldInfo fi) | void | markStaticRoot(int objref) | void | markThreadRoot(int objref, int tid) | public int | newArray(String type, int size, ThreadInfo th) Creates a new array of the given type. | public int | newConstantString(String str) Creates a new constant string. | public int | newObject(ClassInfo ci, ThreadInfo th) Creates a new object of the given class. | public int | newString(String str, ThreadInfo th) Creates a new string. | void | registerWeakReference(Fields f) | public void | setOutOfMemory(boolean isOutOfMemory) |
isUsed | BitSet isUsed(Code) | | Used to store various mark phase infos
|
outOfMemory | boolean outOfMemory(Code) | | |
runFinalizer | boolean runFinalizer(Code) | | |
analyzeHeap | public void analyzeHeap(boolean sweep)(Code) | | Our precise mark & sweep garbage collector. Be aware of two things
(1) it's called every transition (forward) we detect has changed a reference,
to ensure heap symmetry (save states), but at the cost of huge
gc loads, where we cannot perform all the nasty performance tricks of
'normal' GCs
(2) we do even more - we keep track of reachability, i.e. if an object is
reachable from a thread root object, to check if it is thread local
(in which case we can ignore corresponding field accesses as potential
scheduling relevant insns in our on-the-fly partial order reduction).
Note that reachability does not mean accessibility, which is much harder
|
checkWeakRefs | void checkWeakRefs()(Code) | | reset all weak references that now point to collected objects to 'null'
NOTE: this implementation requires our own Reference/WeakReference implementation, to
make sure the 'ref' field is the first one
|
getOutOfMemory | public boolean getOutOfMemory()(Code) | | |
isSchedulingRelevantObject | public boolean isSchedulingRelevantObject(int objRef)(Code) | | |
isStatic | public boolean isStatic()(Code) | | |
markPinnedDown | void markPinnedDown(int objref)(Code) | | |
markRecursive | void markRecursive(int objref)(Code) | | recursive attribute propagating marker, used to traverse the object graph
(it's here so that we can pass in gc-local data into the ElementInfo
methods). This method is called on all root objects, and starts the
traversal:
DynamicArea.markRecursive(objref) <-- tid, default attrMask
ElementInfo.markRecursive(tid,attrMask) <-- object attributes
Fields.markRecursive(tid,attributes,attrMask) <-- field info
DynamicArea.markRecursive(objref,tid,refAttrs, attrMask, fieldInfo)
|
markRecursive | void markRecursive(int objref, int refTid, int refAttr, int attrMask, FieldInfo fi)(Code) | | |
markStaticRoot | void markStaticRoot(int objref)(Code) | | called during non-recursive phase1 marking of all objects reachable
from static fields
|
markThreadRoot | void markThreadRoot(int objref, int tid)(Code) | | called during non-recursive phase1 marking of all objects reachable
from Thread roots
|
newArray | public int newArray(String type, int size, ThreadInfo th)(Code) | | Creates a new array of the given type.
|
newConstantString | public int newConstantString(String str)(Code) | | Creates a new constant string.
only called from LDC and LDC_W
|
registerWeakReference | void registerWeakReference(Fields f)(Code) | | |
setOutOfMemory | public void setOutOfMemory(boolean isOutOfMemory)(Code) | | |
|
|