28 Win32Heap(
const char*
name,
size_t initialSize=0,
size_t maxSize=0);
34 void*
Alloc(
size_t size);
36 void*
Realloc(
void* ptr,
size_t newSize);
40 #if NEBULA_MEMORY_STATS
51 static bool ValidateAllHeaps();
53 bool ValidateHeap()
const;
57 static void DumpLeaksAllHeaps();
59 long GetAllocCount()
const;
61 long GetAllocSize()
const;
63 static void DumpHeapMemoryLeaks(
const char* heapName, HANDLE hHeap);
73 #if NEBULA_MEMORY_STATS
74 long volatile allocCount;
75 long volatile allocSize;
98 #if NEBULA_MEMORY_STATS
113 #if NEBULA_MEMORY_STATS
129 #if NEBULA_MEMORY_STATS
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
Win32 implementation of the class Memory::Heap.
Definition win32heap.h:23
HANDLE heap
Definition win32heap.h:70
void Free(void *ptr)
free a block of memory which has been allocated from this heap
Definition win32heap.h:126
const char * GetName() const
get heap name
Definition win32heap.h:86
~Win32Heap()
destructor
Definition win32heap.cc:68
void * Alloc(size_t size)
allocate a block of memory from the heap
Definition win32heap.h:96
const char * name
Definition win32heap.h:71
void * Realloc(void *ptr, size_t newSize)
re-allocate a block of memory
Definition win32heap.h:111
static void Setup()
static setup method (called by Core::SysFunc::Setup)
Definition win32heap.cc:25
Win32Heap()
default constructor not allowed
#define n_assert(exp)
Definition debug.h:50
__forceinline SIZE_T __HeapSize16(HANDLE hHeap, DWORD dwFlags, LPCVOID lpMem)
HeapSize replacement function.
Definition win32memoryconfig.h:167
__forceinline LPVOID __HeapReAlloc16(HANDLE hHeap, DWORD dwFlags, LPVOID lpMem, SIZE_T dwBytes)
HeapReAlloc replacement for 16-byte alignment.
Definition win32memoryconfig.h:119
__forceinline LPVOID __HeapAlloc16(HANDLE hHeap, DWORD dwFlags, SIZE_T dwBytes)
HeapAlloc replacement which always returns 16-byte aligned addresses.
Definition win32memoryconfig.h:105
__forceinline BOOL __HeapFree16(HANDLE hHeap, DWORD dwFlags, LPVOID lpMem)
HeapFree replacement which always returns 16-byte aligned addresses.
Definition win32memoryconfig.h:155
int Decrement(int volatile *var)
interlocked decrement, return result
Definition gccinterlocked.cc:157
int Add(int volatile *var, int add)
interlocked add
Definition gccinterlocked.cc:22
int Increment(int volatile *var)
interlocked increment, return result
Definition gccinterlocked.cc:148
[TODO: Describe Win32 subsystem]