Nebula
Toggle main menu visibility
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
15
namespace
Memory
16
{
17
18
//------------------------------------------------------------------------------
26
enum
HeapType
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
40
NumHeapTypes
,
41
InvalidHeapType
,
42
};
43
44
//------------------------------------------------------------------------------
49
extern
void
*
volatile
Heaps
[
NumHeapTypes
];
50
51
//------------------------------------------------------------------------------
58
extern
void
SetupHeaps
();
59
60
//------------------------------------------------------------------------------
64
extern
const
char
*
GetHeapTypeName
(
HeapType
heapType);
65
66
}
// namespace Memory
67
//------------------------------------------------------------------------------
68
#endif
config.h
Nebula compiler specific defines and configuration.
Memory
Definition
arenaallocator.h:31
Memory::GetHeapTypeName
const char * GetHeapTypeName(HeapType heapType)
Returns a human readable name for a heap type.
Definition
osxmemoryconfig.cc:52
Memory::HeapType
HeapType
Heap types are defined here.
Definition
osxmemoryconfig.h:25
Memory::NumHeapTypes
@ NumHeapTypes
Definition
osxmemoryconfig.h:36
Memory::StreamDataHeap
@ StreamDataHeap
Definition
osxmemoryconfig.h:32
Memory::AppHeap
@ AppHeap
Definition
osxmemoryconfig.h:34
Memory::ResourceHeap
@ ResourceHeap
Definition
osxmemoryconfig.h:29
Memory::DefaultHeap
@ DefaultHeap
Definition
osxmemoryconfig.h:26
Memory::ScriptingHeap
@ ScriptingHeap
Definition
posixmemoryconfig.h:38
Memory::ObjectHeap
@ ObjectHeap
Definition
osxmemoryconfig.h:27
Memory::InvalidHeapType
@ InvalidHeapType
Definition
osxmemoryconfig.h:37
Memory::PhysicsHeap
@ PhysicsHeap
Definition
osxmemoryconfig.h:33
Memory::NetworkHeap
@ NetworkHeap
Definition
posixmemoryconfig.h:37
Memory::ObjectArrayHeap
@ ObjectArrayHeap
Definition
osxmemoryconfig.h:28
Memory::ScratchHeap
@ ScratchHeap
Definition
osxmemoryconfig.h:30
Memory::StringDataHeap
@ StringDataHeap
Definition
osxmemoryconfig.h:31
Memory::SetupHeaps
void SetupHeaps()
Setup the global heaps.
Definition
osxmemoryconfig.cc:19
Memory::Heaps
malloc_zone_t * Heaps[NumHeapTypes]
Heap pointers are defined here.
Definition
osxmemoryconfig.cc:12
code
foundation
memory
posix
posixmemoryconfig.h
Generated on
for Nebula. Dark theme by
Tilen Majerle
. All rights reserved.