Heap, Handles, Instance Data and Garbage Collector


HandlePool maps abstract object references to native pointers (namely to the InstanceData pointers) that point to the real memory allocated by an object.
HandlePool also maintains the table of "interned" String literals and the table of "roots"
which is constantly updated by all the stack frame operations related to object references.


GarbageCollector is the very special case of thread responsible for cleaning up the Java heap of the objects that are no longer referenced.
It also defines the "step" function in such a way that it can be picked up by the execution pool as well as any other thread.
Garbage Collector's step consists of two phases: "mark" and "sweep".
Most of the time GC is running with minimal priority. The priority boosts only in cases of "emergency" - when the memory is too low to allocate any new objects.

Includes

HeapManager.h The definition of the memory_chunk structure and the HeapManager class
HandlePool.h The definition of the HandlePool class
GarbageCollector.h The definition of the GarbageCollector class
ObjectData.h The definition of the ObjectData, ClassData, InstanceData and the related ArrayData classes; the definition of the monitor structure

Sources

HeapManager.cpp The implementation of the memory_chunk and the HeapManager
HandlePool.cpp The implementation of the HandlePool class
GarbageCollector.cpp The implementation of the GarbageCollector class
ObjectData.cpp The implementation of the ObjectData, ClassData, InstanceData and the related ArrayData classes; the implementation of the monitor structure

@