29 #ifndef __MemoryStdAlloc_H__ 30 #define __MemoryStdAlloc_H__ 41 #if OGRE_MEMORY_ALLOCATOR == OGRE_MEMORY_ALLOCATOR_STD 61 const char* file = 0,
int line = 0,
const char* func = 0
63 const char* = 0,
int = 0,
const char* = 0
67 void* ptr = malloc(count);
68 #if OGRE_MEMORY_TRACKER 70 MemoryTracker::get()._recordAlloc(ptr, count, 0, file, line, func);
77 #if OGRE_MEMORY_TRACKER 78 MemoryTracker::get()._recordDealloc(ptr);
86 return std::numeric_limits<size_t>::max();
106 template <
size_t Alignment = 0>
111 typedef int IsValidAlignment
112 [Alignment <= 128 && ((Alignment & (Alignment-1)) == 0) ? +1 : -1];
116 const char* file = 0,
int line = 0,
const char* func = 0
118 const char* = 0,
int = 0,
const char* = 0
124 #if OGRE_MEMORY_TRACKER 126 MemoryTracker::get()._recordAlloc(ptr, count, 0, file, line, func);
133 #if OGRE_MEMORY_TRACKER 134 MemoryTracker::get()._recordDealloc(ptr);
142 return std::numeric_limits<size_t>::max();
159 #endif // __MemoryStdAlloc_H__ static void * allocateBytes(size_t count, const char *=0, int=0, const char *=0)
static void * allocate(size_t size, size_t alignment)
Allocate memory with given alignment.
static void deallocate(void *p)
Deallocate memory that allocated by this class.
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 deallocateBytes(void *ptr)
static void deallocateBytes(void *ptr)
#define OGRE_MEMORY_TRACKER
static size_t getMaxAllocationSize()
Get the maximum size of a single allocation.
static size_t getMaxAllocationSize()
Get the maximum size of a single allocation.
A "standard" allocation policy for use with AllocatedObject and STLAllocator, which aligns memory at ...