CFx SDK Documentation  2022 SP0
Macros
OdAllocOp.h File Reference
#include <stdlib.h>
#include "OdAllocExport.h"
#include "OdAlloc.h"
#include <new>

Go to the source code of this file.

Macros

#define ODRX_SIZED_DEALLOC_OPERATORS()
 
#define ODRX_NOTHROW_ALLOC_OPERATORS()
 
#define ODRX_ALLOC_OPERATORS()
 
#define TD_CDECL
 defined(_WIN32_WCE) More...
 
#define ODRX_CRTDBG_MAP_ALLOC_OPERATORS()
 

Macro Definition Documentation

◆ ODRX_ALLOC_OPERATORS

#define ODRX_ALLOC_OPERATORS ( )
Value:
void* operator new (size_t size) throw(std::bad_alloc) \
{ \
void* p = ::odrxAlloc(size); \
/*Under GCC std::allocator allocates zero sizes via operator new (by default)*/ \
if (!p && size) throw std::bad_alloc(); \
return p; \
} \
void operator delete (void *p) throw() \
{ \
if (!p) return; \
} \
void* operator new[](size_t size) throw(std::bad_alloc) \
{ \
void* p = ::odrxAlloc(size); \
if (!p && size) throw std::bad_alloc(); \
return p; \
} \
void operator delete[](void *p) throw() \
{ \
if (!p) return; \
} \
ODRX_NOTHROW_ALLOC_OPERATORS() \
ODRX_SIZED_DEALLOC_OPERATORS() \
ALLOCDLL_EXPORT void * odrxAlloc(size_t nBytes)
ALLOCDLL_EXPORT void odrxFree(void *pMemBlock)
GLsizeiptr size
Definition: gles2_ext.h:182

Definition at line 94 of file OdAllocOp.h.

◆ ODRX_CRTDBG_MAP_ALLOC_OPERATORS

#define ODRX_CRTDBG_MAP_ALLOC_OPERATORS ( )
Value:
void* TD_CDECL operator new(size_t size, int, const char*,int) { return ::operator new(size); } \
void* TD_CDECL operator new[](size_t size, int, const char*, int) { return ::operator new[](size); }
#define TD_CDECL
defined(_WIN32_WCE)
Definition: OdAllocOp.h:143

Definition at line 147 of file OdAllocOp.h.

◆ ODRX_NOTHROW_ALLOC_OPERATORS

#define ODRX_NOTHROW_ALLOC_OPERATORS ( )
Value:
void *operator new (size_t size, const std::nothrow_t&) throw() { return operator new(size); } \
void * operator new[] (::size_t count, const std::nothrow_t&) throw() { return operator new[](count); }\
void operator delete[](void *ptr, const std::nothrow_t&) throw() { operator delete[](ptr); } \
void operator delete (void *ptr, const std::nothrow_t&) throw() { operator delete(ptr); } \
GLsizei GLsizei * count
Definition: gles2_ext.h:276

Definition at line 62 of file OdAllocOp.h.

◆ ODRX_SIZED_DEALLOC_OPERATORS

#define ODRX_SIZED_DEALLOC_OPERATORS ( )

Definition at line 59 of file OdAllocOp.h.

◆ TD_CDECL

#define TD_CDECL

defined(_WIN32_WCE)

Definition at line 143 of file OdAllocOp.h.