|
Public Types |
enum | HeapType {
RC_Heap = 0x0001,
RC_GC_Heap = 0x0002,
PA_Heap = 0x0004,
GC_Heap = 0x0008,
Garbage_Heap = 0x0010,
Private_Heap = 0x0020
} |
| HeapType declares the Type of heap, with different memory management strategies. More...
|
Public Member Functions |
Allocator * | staticAllocator () |
| return the allocator configured to allocate static objects
|
Static Public Member Functions |
Allocator * | allocator () |
| returns the current allocator
|
bool | notifyBeforeObjectDestruction (Object *obj) |
| called if RefCount is zero.
|
void | notifyWhileObjectDestruction (Object *obj) |
| will be called after finalize but bufore ~acdk::lang::Object
|
void | listHeaps (::acdk::lang::ref::NotifyObjectEventListener *listener, bool allthreads) |
void | listObjects (::acdk::lang::ref::NotifyObjectEventListener *listener, int flags) |
void | listedAllocated (::acdk::lang::ref::NotifyObjectEventListener *listener, int flags, AllocatedType type) |
int | objectCount (bool total=false) |
| returns the count of allocated Object in current or all Heaps If the current Heap has no tracking, returns 0.
|
size_t | totalAllocated (bool total=false) |
| returns the allocated Memory in current or all Heaps.
|
bool | gc (bool total=false) |
| try to free Object References, which has no external References.
|
void | newHeapObject (Object *obj) |
| register this object as new dynamically allocated object
|
bool | onHeapAllocated (Object *obj) |
| looks if given Object is in the current heap
|
void | pushFrame (HeapType heaptype=RC_GC_Heap, HeapInfo info=HeapIsThread, const char *name=) |
| creates a new HeapFrame
|
void | popFrame (HeapInfo info=HeapIsThread) |
| destroys the the top (last pushed) Heap
|
void | pushFrame (RHeapFrame heap) |
| Make the given HeapFrame as top active HeapFrame.
|
bool | deleteFrame (const char *name) |
| destroys the frame, take care, this can have side effects
|
RHeapFrame | topHeapFrame () |
| returns the last pushed frame
|
RHeapFrame | globalHeap () |
| The which holds globals (not bound to Thread.
|
RHeapFrame | staticHeap () |
| The which hold the statics.
|
RHeapFrame | getStaticFrame () |
| The which hold the statics.
|
RHeapFrame | getThreadLocalHeap () |
| used to allocate ThreadLocal
|
Allocator * | getThreadLocalAllocator () |
| return the allocator specific to this thread
|
Object * | newStaticObject (Object *object) |
| Registers the object as an static instance.
|
void | registerStaticReference (RObject *reference) |
| register the an reference to Object as an static/global reference.
|
void | registerStaticReference (Object *reference) |
| register the an reference to Object as an static/global reference.
|
void | clearAllStaticReferences () |
| clear all via registerStaticReference registered reference (set to Nil).
|
bool | isStaticReferenceObject (Object *obj) |
| return true if the given object instance is held by a static reference
|
void | lockHeap () |
| locks the ObjectHeap interface
|
void | unlockHeap () |
void | removeThreadHeap () |
| removes the heaps connected with the current Thread
|
unsigned int | stackBase () |
| return the adress of the stack base pointer
|
void | saveStackBase (unsigned int sp) |
jlong | getMaxMemoryUsage () |
| return the overal limit of memory usage
|
void | setMaxMemoryUsage (jlong maxmem) |
| set the overall limit of memory usage
|
jlong | getThreadMaxMemoryUsage () |
| return the limit of memory usage inside this thread
|
void | setThreadMaxMemoryUsage (jlong maxmem) |
jlong & | threadMaxMemoryUsage () |
jlong & | maxMemoryUsage () |
jlong & | curMemUsage () |
jlong & | curThreadMemUsage () |
jlong | getMaxAllocatedMem () |
Static Protected Member Functions |
bool | _onHeapAllocated (const Object *obj) |
| unsynchronized version
|
Object * | _newStaticObject (Object *obj) |
| unsynchronized version
|
Private Member Functions |
| ObjectHeap () |
| private constructor. This class is static
|