Nebula
Loading...
Searching...
No Matches
posixmemoryconfig.h
Go to the documentation of this file.
1#pragma once
2#ifndef MEMORY_POSIXMEMORYCONFIG_H
3#define MEMORY_POSIXMEMORYCONFIG_H
4//------------------------------------------------------------------------------
13#include "core/config.h"
14
15namespace Memory
16{
17
18//------------------------------------------------------------------------------
27{
28 DefaultHeap = 0, // for stuff that doesn't fit into any category
29 ObjectHeap, // heap for global new allocator
30 ObjectArrayHeap, // heap for global new[] allocator
31 ResourceHeap, // heap for resource data (like animation buffers)
32 ScratchHeap, // for short-lived scratch memory (encode/decode buffers, etc...)
33 StringDataHeap, // special heap for string data
34 StreamDataHeap, // special heap for stream data like memory streams, zip file streams, etc...
35 PhysicsHeap, // physics engine allocations go here
36 AppHeap, // for general Application layer stuff
37 NetworkHeap, // for network layer
38 ScriptingHeap, // for scripting layers
39
42};
43
44//------------------------------------------------------------------------------
49extern void* volatile Heaps[NumHeapTypes];
50
51//------------------------------------------------------------------------------
58extern void SetupHeaps();
59
60//------------------------------------------------------------------------------
64extern const char* GetHeapTypeName(HeapType heapType);
65
66} // namespace Memory
67//------------------------------------------------------------------------------
68#endif
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
@ ScriptingHeap
Definition posixmemoryconfig.h:38
@ ObjectHeap
Definition osxmemoryconfig.h:27
@ InvalidHeapType
Definition osxmemoryconfig.h:37
@ PhysicsHeap
Definition osxmemoryconfig.h:33
@ NetworkHeap
Definition posixmemoryconfig.h:37
@ 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