CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
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)
 
#define ODRX_CRTDBG_MAP_ALLOC_OPERATORS()
 

Macro Definition Documentation

◆ ODRX_ALLOC_OPERATORS

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

Definition at line 96 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:145

Definition at line 149 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 145 of file OdAllocOp.h.