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 =
new unsigned char[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);
80 delete[]((
unsigned char*)ptr);
86 return std::numeric_limits<size_t>::max();
106 template <
size_t Alignment = 0>
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();
#define OGRE_MEMORY_TRACKER
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, which aligns memory at ...
static size_t getMaxAllocationSize()
Get the maximum size of a single allocation.
static void deallocateBytes(void *ptr)
int IsValidAlignment[Alignment<=128 &&((Alignment &(Alignment-1))==0) ?+1 :-1]
static void * allocateBytes(size_t count, const char *=0, int=0, const char *=0)
A "standard" allocation policy for use with AllocatedObject and STLAllocator.
static void deallocateBytes(void *ptr)
static size_t getMaxAllocationSize()
Get the maximum size of a single allocation.
static void * allocateBytes(size_t count, const char *=0, int=0, const char *=0)