29 #ifndef __AllocatedObject_H__
30 #define __AllocatedObject_H__
57 template <
class Alloc>
68 void*
operator new(
size_t sz,
const char* file,
int line,
const char* func)
70 return Alloc::allocateBytes(sz, file, line, func);
73 void*
operator new(
size_t sz)
75 return Alloc::allocateBytes(sz);
79 void*
operator new(
size_t sz,
void* ptr)
86 void*
operator new[] (
size_t sz,
const char* file,
int line,
const char* func )
88 return Alloc::allocateBytes(sz, file, line, func);
91 void*
operator new[] (
size_t sz )
93 return Alloc::allocateBytes(sz);
96 void operator delete(
void* ptr )
98 Alloc::deallocateBytes(ptr);
102 void operator delete(
void* ptr,
void* )
104 Alloc::deallocateBytes(ptr);
108 void operator delete(
void* ptr,
const char* , int ,
const char* )
110 Alloc::deallocateBytes(ptr);
113 void operator delete[] (
void* ptr )
115 Alloc::deallocateBytes(ptr);
119 void operator delete[] (
void* ptr,
const char* , int ,
const char* )
121 Alloc::deallocateBytes(ptr);
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...