Nebula
Loading...
Searching...
No Matches
osxmemoryconfig.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
11#include "core/config.h"
12
13namespace Memory
14{
15
16//------------------------------------------------------------------------------
25{
26 DefaultHeap = 0, // for stuff that doesn't fit into any category
27 ObjectHeap, // standard heap for C++ objects
28 ObjectArrayHeap, // for objects that use the array new/delete operator
29 ResourceHeap, // heap for resource data (like animation buffers)
30 ScratchHeap, // for short-lived scratch memory (encode/decode buffers, etc...)
31 StringDataHeap, // special heap for string data
32 StreamDataHeap, // special heap for stream data like memory streams, zip file streams, etc...
33 PhysicsHeap, // physics engine allocations go here
34 AppHeap, // for general Application layer stuff
35
38};
39
40//------------------------------------------------------------------------------
45extern malloc_zone_t* Heaps[NumHeapTypes];
46
47//------------------------------------------------------------------------------
54extern void SetupHeaps();
55
56//------------------------------------------------------------------------------
60extern const char* GetHeapTypeName(HeapType heapType);
61
62} // namespace Memory
63//------------------------------------------------------------------------------
Nebula compiler specific defines and configuration.
Definition arenaallocator.h:31
const char * GetHeapTypeName(HeapType heapType)
Returns a human readable name for a heap type.
Definition osxmemoryconfig.cc:52
HeapType
Heap types are defined here.
Definition osxmemoryconfig.h:25
@ NumHeapTypes
Definition osxmemoryconfig.h:36
@ StreamDataHeap
Definition osxmemoryconfig.h:32
@ AppHeap
Definition osxmemoryconfig.h:34
@ ResourceHeap
Definition osxmemoryconfig.h:29
@ DefaultHeap
Definition osxmemoryconfig.h:26
@ ObjectHeap
Definition osxmemoryconfig.h:27
@ InvalidHeapType
Definition osxmemoryconfig.h:37
@ PhysicsHeap
Definition osxmemoryconfig.h:33
@ ObjectArrayHeap
Definition osxmemoryconfig.h:28
@ ScratchHeap
Definition osxmemoryconfig.h:30
@ StringDataHeap
Definition osxmemoryconfig.h:31
void SetupHeaps()
Setup the global heaps.
Definition osxmemoryconfig.cc:19
malloc_zone_t * Heaps[NumHeapTypes]
Heap pointers are defined here.
Definition osxmemoryconfig.cc:12