|
Public Member Functions |
| PagedAllocator (int size, int bufferedPages=100) |
virtual | ~PagedAllocator () |
virtual void * | allocate (size_t size, AllocatedType at=RawMem) |
| Allocates Memory.
|
virtual void | deallocate (void *ptr, AllocatedType at=RawMem) |
| Frees Memory.
|
virtual void * | raw_allocate (size_t size, AllocatedType type) |
virtual void | raw_deallocate (size_t size, void *ptr, AllocatedType type) |
virtual void | listObjects (::acdk::lang::ref::NotifyObjectEventListener *listener, int flags) |
PagedAllocatorPage * | _allocatePage (int size=0) |
void | _deallocatePage (PagedAllocatorPage *page) |
void * | allocate (int size, short type) |
void | dumpStatistics (bool withDetails=false, int memberlevel=0, bool onlyumarked=false) |
| dump statistics of Alloctor on cout
- withDetails dumps with details on heap memory objects
- memberlevel if memory object is Object, dump information about member recursivly * memberlevel
|
int | getElementCount (AllocatedType type) const |
| count of elements in the pages
|
int | getAllocatedCount (AllocatedType type) const |
| return number of bytes allocated by given type
|
bool | doGc (bool threadStorage=true, bool force=false) |
| try to free memory.
|
Protected Member Functions |
void * | _allocate (int size, short type) |
void * | _allocateObject (int size) |
void | _deallocateObject (void *ptr) |
PagedAllocatorPage * | _allocatePage2 (int size) |
void | _deallocatePage2 (PagedAllocatorPage *page) |
Protected Attributes |
int | _standardPageSize |
PagedAllocatorPage * | _first |
PagedAllocatorPage * | _last |
int | _reservedPages |
core_vector< PagedAllocatorPage * > | _bufferedPages |
int | _maxBufferedPages |
PagedHeap * | _heap |
| if _heap != 0, Allocator should inform on changes (destroyObject)
|
Friends |
class | PagedHeap |
class | PagedAllocatorObjectsIterator |