29 #ifndef __AllocatedObject_H__
30 #define __AllocatedObject_H__
56 template <
class Alloc>
67 void*
operator new(
size_t sz,
const char* file,
int line,
const char* func)
69 return Alloc::allocateBytes(sz, file, line, func);
72 void*
operator new(
size_t sz)
74 return Alloc::allocateBytes(sz);
78 void*
operator new(
size_t sz,
void* ptr)
85 void*
operator new[] (
size_t sz,
const char* file,
int line,
const char* func )
87 return Alloc::allocateBytes(sz, file, line, func);
90 void*
operator new[] (
size_t sz )
92 return Alloc::allocateBytes(sz);
95 void operator delete(
void* ptr )
97 Alloc::deallocateBytes(ptr);
101 void operator delete(
void* ptr,
void* )
103 Alloc::deallocateBytes(ptr);
107 void operator delete(
void* ptr,
const char* , int ,
const char* )
109 Alloc::deallocateBytes(ptr);
112 void operator delete[] (
void* ptr )
114 Alloc::deallocateBytes(ptr);
118 void operator delete[] (
void* ptr,
const char* , int ,
const char* )
120 Alloc::deallocateBytes(ptr);
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...