Go to the documentation of this file.
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>
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)
A "standard" allocation policy for use with AllocatedObject and STLAllocator, which aligns memory at ...
#define OGRE_MEMORY_TRACKER
static void deallocateBytes(void *ptr)
static void deallocate(void *p)
Deallocate memory that allocated by this class.
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.
static void * allocate(size_t size, size_t alignment)
Allocate memory with given alignment.
static void deallocateBytes(void *ptr)
static void * allocateBytes(size_t count, const char *=0, int=0, const char *=0)
int IsValidAlignment[Alignment<=128 &&((Alignment &(Alignment-1))==0) ?+1 :-1]
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Tue Apr 13 2021 08:53:15