Go to the documentation of this file.
46 #define ALLOCATE_RAW(Allocator, Desc, Size) (Allocator).Allocate(Size, Desc, __FILE__, __LINE__)
47 #define ALLOCATE(Allocator, Desc, Type, Count) reinterpret_cast<Type*>(ALLOCATE_RAW(Allocator, Desc, sizeof(Type) * (Count)))
48 #define FREE(Allocator, Ptr) Allocator.Free(Ptr)
54 inline void*
operator new(
size_t Size,
const char* dbgDescription,
const char* dbgFileName,
const int dbgLineNumber)
59 inline void*
operator new[](
size_t Size,
const char* dbgDescription,
const char* dbgFileName,
const int dbgLineNumber)
65 inline void operator delete(
void* Ptr,
const char* dbgDescription,
const char* dbgFileName,
const int dbgLineNumber)
70 inline void operator delete[](
void* Ptr,
const char* dbgDescription,
const char* dbgFileName,
const int dbgLineNumber)
75 # define MemAlloc(Size, Desc) GetRawAllocator().Allocate(Size, Desc, __FILE__, __LINE__)
76 # define MemFree(Ptr) GetRawAllocator().Free(Ptr)
77 # define New(Desc) new (Desc, __FILE__, __LINE__)
78 # define Delete delete
IMemoryAllocator & GetRawAllocator()
Returns raw memory allocator.
Definition: EngineMemory.cpp:51
void SetRawAllocator(IMemoryAllocator *pRawAllocator)
Sets raw memory allocator. This function must be called before any memory allocation/deallocation fun...
Definition: EngineMemory.cpp:41
#define DILIGENT_END_NAMESPACE
Definition: CommonDefinitions.h:86
#define DILIGENT_BEGIN_NAMESPACE(Name)
Definition: CommonDefinitions.h:82
IMemoryAllocator & GetStringAllocator()
Definition: EngineMemory.cpp:56
virtual void Free(void *Ptr)=0
Releases memory.
virtual void * Allocate(size_t Size, const Char *dbgDescription, const char *dbgFileName, const Int32 dbgLineNumber)=0
Allocates block of memory.
The library uses Direct3D-style math:
Definition: AdvancedMath.hpp:37