23 OSXHeap(
const char*
name,
size_t initialSize=64 * 1024);
29 void*
Alloc(
size_t size,
size_t alignment=16);
31 void*
Realloc(
void* ptr,
size_t newSize);
35 #if NEBULA_MEMORY_STATS
46 static bool ValidateAllHeaps();
48 bool ValidateHeap()
const;
52 static void DumpLeaksAllHeaps();
54 int GetAllocCount()
const;
56 int GetAllocSize()
const;
66 #if NEBULA_MEMORY_STATS
67 int volatile allocCount;
68 int volatile allocSize;
OSX implementation of Memory::Heap.
Definition osxheap.h:18
OSXHeap()
default constructor not allowed
void Free(void *ptr)
free a block of memory
Definition osxheap.cc:121
~OSXHeap()
destructor
Definition osxheap.cc:56
void * Realloc(void *ptr, size_t newSize)
re-allocate a block of memory
Definition osxheap.cc:100
malloc_zone_t * heapZone
Definition osxheap.h:64
static void Setup()
static setup method (called by Core::SysFunc::Setup)
Definition osxheap.cc:24
const char * name
Definition osxheap.h:63
void * Alloc(size_t size, size_t alignment=16)
allocate a block of memory from the heap
Definition osxheap.cc:81
const char * GetName() const
get heap name
Definition osxheap.h:79
Critical section objects are used to protect a portion of code from parallel execution.
Nebula's dynamic array class.
Definition array.h:60
the list iterator
Definition list.h:76
Implements a doubly linked list.
Definition list.h:20
#define n_assert(exp)
Definition debug.h:50
Definition osxsysfunc.h:21