18#pragma warning (disable : 4595)
34extern void*
Alloc(
HeapType heapType,
size_t size,
size_t align = 16);
50extern bool IsOverlapping(
const unsigned char* srcPtr,
size_t srcSize,
const unsigned char* dstPtr,
size_t dstSize);
52#define StackAlloc(size) _malloca(size);
53#define StackFree(ptr) _freea(ptr);
77#if NEBULA_MEMORY_ADVANCED_DEBUGGING
79extern bool ValidateMemory();
81extern void Checkpoint(
const char* msg);
85void DisableMemoryLogging();
89void DumpMemoryLeaks();
92#if NEBULA_MEMORY_ADVANCED_DEBUGGING
93#define __MEMORY_CHECKPOINT(s) Memory::Checkpoint(##s)
95#define __MEMORY_CHECKPOINT(s)
99#define __MEMORY_VALIDATE(s)
Nebula compiler specific defines and configuration.
Definition arenaallocator.h:31
TotalMemoryStatus GetTotalMemoryStatus()
Get the system's total memory status.
Definition osxmemory.cc:201
__forceinline void FreeVirtual(void *ptr, size_t size)
free virtual memory
Definition posixmemory.h:146
int volatile TotalAllocSize
Definition win32memory.cc:17
int volatile TotalAllocCount
Definition win32memory.cc:16
void * Alloc(HeapType heapType, size_t size, size_t alignment)
Allocate a block of memory from one of the global heaps.
Definition osxmemory.cc:56
__forceinline void CommitVirtual(void *ptr, size_t size)
commit virtual memory
Definition posixmemory.h:135
int volatile HeapTypeAllocCount[NumHeapTypes]
Definition win32memory.cc:18
int volatile HeapTypeAllocSize[NumHeapTypes]
Definition win32memory.cc:19
void Free(HeapType heapType, void *ptr)
Free a block of memory.
Definition osxmemory.cc:136
void * Realloc(HeapType heapType, void *ptr, size_t size)
Re-Allocate a block of memory from one of the global heaps.
Definition osxmemory.cc:99
HeapType volatile MemoryLoggingHeapType
Definition win32memory.cc:22
__forceinline void * AllocVirtual(size_t size)
allocate a range of virtual memory space
Definition posixmemory.h:112
char * DuplicateCString(const char *from)
Duplicate a 0-terminated string, this method should no longer be used!
Definition osxmemory.cc:166
unsigned int volatile MemoryLoggingThreshold
Definition win32memory.cc:21
HeapType
Heap types are defined here.
Definition osxmemoryconfig.h:25
@ NumHeapTypes
Definition osxmemoryconfig.h:36
@ InvalidHeapType
Definition osxmemoryconfig.h:37
bool IsOverlapping(const unsigned char *srcPtr, size_t srcSize, const unsigned char *dstPtr, size_t dstSize)
Test if 2 areas of memory areas are overlapping.
Definition osxmemory.cc:180
void DumpTotalMemoryStatus()
Dump detail memory status information.
Definition win32memory.cc:183
__forceinline void DecommitVirtual(void *ptr, size_t size)
decommit virtual memory
Definition posixmemory.h:123
Get the system's total current memory, this does not only include Nebula's memory allocations but the...
Definition win32memory.h:61
unsigned int totalVirtual
Definition osxmemory.h:55
unsigned int totalPhysical
Definition osxmemory.h:53
unsigned int availVirtual
Definition osxmemory.h:56
unsigned int availPhysical
Definition osxmemory.h:54
Central config file for memory setup on the Win32 platform.