acme
Foundational cross-platform layer of the ca2 framework
Toggle main menu visibility
Loading...
Searching...
No Matches
_new.inl
1
2
//#pragma once
3
//
4
//
5
//#include "memory_allocate.h"
6
//
7
//
8
//#if !defined(NO_ACME_MEMORY_MANAGEMENT)
9
//
10
//
11
//void MEMORY_DECL operator delete(void* p, size_t n) del_throw_spec
12
//{
13
//
14
// ::operator delete(p);
15
//
16
//}
17
//
18
//
19
//#endif
20
//
21
//
23
//
24
//
25
//void* MEMORY_DECL operator new(size_t size)
26
//{
27
//
28
// auto p = memory_allocate(size);
29
//
30
// return p;
31
//
32
//}
33
//
34
//
35
//void* MEMORY_DECL operator new(size_t nSize, const std::nothrow_t&) noexcept
36
//{
37
//
38
// auto p = memory_allocate(nSize);
39
//
45
//
46
// return p;
47
//
48
//}
49
//
50
//
51
//void MEMORY_DECL operator delete(void * p) del_throw_spec
52
//{
53
//
54
// memory_free(p);
55
//
56
//}
57
//
58
//
59
//#ifdef WINDOWS
60
//
61
//
62
//void* MEMORY_DECL operator new[](size_t nSize)
63
//{
64
//
65
// return ::operator new(nSize);
66
//
67
//}
68
//
69
//
70
//#else
71
//
72
//
73
//void* MEMORY_DECL operator new[](size_t nSize) new_throw_spec
74
//{
75
//
76
// return ::operator new(nSize);
77
//
78
//}
79
//
80
//
81
//#endif
82
//
83
//
84
//void* MEMORY_DECL operator new[](size_t size, const std::nothrow_t&) noexcept
85
//{
86
//
87
// return memory_allocate(size);
88
//
89
//}
90
//
91
//
92
//void MEMORY_DECL operator delete[](void * p) del_throw_spec
93
//{
94
//
95
// ::operator delete(p);
96
//
97
//}
98
//
99
//
103
//#if defined(UNIVERSAL_WINDOWS) //|| defined(ANDROID)
104
//
105
//
106
//void* MEMORY_DECL operator new(size_t size, void* p) inplace_new_throw_spec
107
//{
108
//
109
// __UNREFERENCED_PARAMETER(size);
110
//
111
// return p;
112
//
113
//}
114
//
115
//
116
//void MEMORY_DECL operator delete(void * p, void* palloc) del_throw_spec
117
//{
118
//
119
// __UNREFERENCED_PARAMETER(p);
120
// __UNREFERENCED_PARAMETER(palloc);
121
//
122
//}
123
//
124
//
125
//#endif
129
//
154
//
155
//
156
//#if !defined(NO_ACME_MEMORY_MANAGEMENT)
157
//
158
//
159
//void* MEMORY_DECL operator new(size_t size, const char * pszFileName, i32 nLine) new_throw_spec
160
//{
161
//
162
// auto p = ::operator new(size, _NORMAL_BLOCK, pszFileName, nLine);
163
//
169
//
170
// return p;
171
//
172
//}
173
//
174
//
175
//void* MEMORY_DECL operator new[](size_t size, const char* pszFileName, i32 nLine) new_throw_spec
176
//{
177
//
178
// return ::operator new[](size, _NORMAL_BLOCK, pszFileName, nLine);
179
//
180
//}
181
//
182
//
183
//void MEMORY_DECL operator delete(void * pData, const char* /* pszFileName */, i32 /* nLine */) del_throw_spec
184
//{
185
//
186
// ::operator delete(pData, _NORMAL_BLOCK, nullptr, -1);
187
//
188
//}
189
//
190
//
191
//void MEMORY_DECL operator delete[](void* pData, const char* /* pszFileName */, i32 /* nLine */) del_throw_spec
192
//{
193
//
194
// ::operator delete(pData, _NORMAL_BLOCK, nullptr, -1);
195
//
196
//}
197
//
198
//
199
//void* MEMORY_DECL operator new(size_t size, i32 nType, const char* pszFileName, i32 nLine)
200
//{
201
//
202
//#if MEMDLEAK
203
//
204
// auto p = memory_allocate(size);
205
// //auto p = ::acme::get()->m_pheapmanagement->memory(::heap::e_memory_main)->allocate(nSize);
206
//
207
//#else
208
//
209
// auto p = memory_allocate_debug(size, nType, pszFileName, nLine);
210
// //auto p = ::acme::get()->m_pheapmanagement->memory(::heap::e_memory_main)->allocate_debug(nSize, nType, pszFileName, nLine);
211
//
212
//#endif
213
//
219
//
220
// return p;
221
//
222
//}
223
//
224
//
225
//void MEMORY_DECL operator delete(void* p, i32 nType, const char* /* pszFileName */, i32 /* nLine */)
226
//{
227
//
228
// memory_free_debug(p, nType);
229
//
230
//}
231
//
232
//
233
//void* MEMORY_DECL operator new[](size_t nSize, i32 nType, const char* pszFileName, i32 nLine)
234
//{
235
//
236
// return ::operator new(nSize, nType, pszFileName, nLine);
237
//
238
//}
239
//
240
//
241
//void MEMORY_DECL operator delete[](void* p, i32 nType, const char* pszFileName, i32 nLine)
242
//{
243
//
244
// ::operator delete(p, nType, pszFileName, nLine);
245
//
246
//}
247
//
248
//
249
//#endif
250
//
251
//
253
//
254
//
255
//
memory
_new.inl
Generated by
1.17.0