acme
Foundational cross-platform layer of the ca2 framework
Loading...
Searching...
No Matches
heap_namespace.inl
1#ifdef RASPBIAN
2
3#define AXIS_MEMORY_MANAGEMENT true
4
5#else
6
7#define AXIS_MEMORY_MANAGEMENT true
8
9#endif
10
11#include "align_byte_count.h"
12
13CLASS_DECL_ACME void simple_debug_print(const ::scoped_string & scopedstr);
14
15extern iptr g_iMonitor;
16
17
18
19namespace HEAP_NAMESPACE
20{
21
22#if !AXIS_MEMORY_MANAGEMENT
23
24
25#include "inline/heap_bare.cpp"
26
27
28#else
29
30
31#ifdef LINUX
32
33
34#include <malloc.h>
35
36
37#endif
38
39
40//#include "acme/platform/static_start.h"
41
42#if defined(MCHECK)
43
44
45#include "heap_mcheck.cpp"
46
47
48#elif defined(_VLD)
49
50
51#include "heap_vld.cpp"
52
53
54#elif defined(__MCRTDBG)
55
56
57#include "heap_mcrtdbg.cpp"
58
59
60#elif MEMDLEAK
61
62
63#include "inline/heap_memdleak.cpp"
64
65
66#else
67
68
69#include "inline/heap_std.cpp"
70
71
72#endif
73
74
75#endif
76
77
78
79
80
81#include "inline/plex.cpp"
82#include "inline/plex_heap.cpp"
83
84plex_heap_alloc_array* g_pheap = nullptr;
85
86
87critical_section* g_pmutexSystemHeap = nullptr;
88
89void initialize()
90{
91
92 g_pheap = new plex_heap_alloc_array;
93
94}
95
96
97void finalize()
98{
99
100 ::acme::del(g_pheap);
101
102}
103
104
105
106} // namespace HEAP_NAMESPACE
107
108
109