29 #ifndef __MemoryStdAlloc_H__
30 #define __MemoryStdAlloc_H__
40 #if OGRE_MEMORY_ALLOCATOR == OGRE_MEMORY_ALLOCATOR_STD
60 const char* file = 0,
int line = 0,
const char* func = 0
62 const char* = 0,
int = 0,
const char* = 0
66 void* ptr = malloc(count);
67 #if OGRE_MEMORY_TRACKER
69 MemoryTracker::get()._recordAlloc(ptr, count, 0, file, line, func);
76 #if OGRE_MEMORY_TRACKER
77 MemoryTracker::get()._recordDealloc(ptr);
85 return std::numeric_limits<size_t>::max();
105 template <
size_t Alignment = 0>
111 [Alignment <= 128 && ((Alignment & (Alignment-1)) == 0) ? +1 : -1];
115 const char* file = 0,
int line = 0,
const char* func = 0
117 const char* = 0,
int = 0,
const char* = 0
123 #if OGRE_MEMORY_TRACKER
125 MemoryTracker::get()._recordAlloc(ptr, count, 0, file, line, func);
132 #if OGRE_MEMORY_TRACKER
133 MemoryTracker::get()._recordDealloc(ptr);
141 return std::numeric_limits<size_t>::max();
155 #endif // __MemoryStdAlloc_H__
static void deallocateBytes(void *ptr)
#define OGRE_MEMORY_TRACKER
static void deallocate(void *p)
Deallocate memory that allocated by this class.
static void deallocateBytes(void *ptr)
A "standard" allocation policy for use with AllocatedObject and STLAllocator.
static void * allocateBytes(size_t count, const char *=0, int=0, const char *=0)
static void * allocateBytes(size_t count, const char *=0, int=0, const char *=0)
A "standard" allocation policy for use with AllocatedObject and STLAllocator, which aligns memory at ...
static void * allocate(size_t size, size_t alignment)
Allocate memory with given alignment.
static size_t getMaxAllocationSize()
Get the maximum size of a single allocation.
static size_t getMaxAllocationSize()
Get the maximum size of a single allocation.
int IsValidAlignment[Alignment<=128 &&((Alignment &(Alignment-1))==0)?+1:-1]