CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Macros | Functions
OdAlloc.h File Reference
#include "OdAllocExport.h"

Go to the source code of this file.

Macros

#define NEW_HANDLER()    throw std::bad_alloc();
 

Functions

ALLOCDLL_EXPORT voidodrxAlloc (size_t nBytes)
 
ALLOCDLL_EXPORT voidodrxRealloc (void *pMemBlock, size_t newSize, size_t oldSize)
 
ALLOCDLL_EXPORT void odrxFree (void *pMemBlock)
 
ALLOCDLL_EXPORT OdUInt64 GetMemoryUsageInternalInfo (OdUInt32 target)
 

Macro Definition Documentation

◆ NEW_HANDLER

#define NEW_HANDLER ( )     throw std::bad_alloc();

Definition at line 41 of file OdAlloc.h.

Function Documentation

◆ GetMemoryUsageInternalInfo()

ALLOCDLL_EXPORT OdUInt64 GetMemoryUsageInternalInfo ( OdUInt32  target)

For internal use only.

◆ odrxAlloc()

ALLOCDLL_EXPORT void * odrxAlloc ( size_t  nBytes)

Defines the interface for ODA Platform memory management.

Allocates a block of memory.

Parameters
nBytes[in] Number of bytes to allocate.
Returns
Returns a pointer to the newly allocated memory block.
See also
Memory Management

◆ odrxFree()

ALLOCDLL_EXPORT void odrxFree ( void pMemBlock)

Frees a block of memory.

Parameters
pMemBlock[in] Pointer to the previously allocated memory block.
See also
Memory Management

◆ odrxRealloc()

ALLOCDLL_EXPORT void * odrxRealloc ( void pMemBlock,
size_t  newSize,
size_t  oldSize 
)

Reallocates a block of memory.

Parameters
pMemBlock[in] Pointer to the previously allocated memory block.
newSize[in] New size in bytes.
oldSize[in] Old size in bytes.
Returns
Returns a pointer to the newly allocated memory block.
See also
Memory Management