OpenDDS  Snapshot(2023/04/28-20:55)
Macros
Allocation_Macros.h File Reference
#include "ace/Malloc_Base.h"
Include dependency graph for Allocation_Macros.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ACE_ALLOCATOR_NEW(POINTER, CONSTRUCTOR, RET_VAL)
 
#define ACE_ALLOCATOR_NEW_RETURN(POINTER, CONSTRUCTOR)
 
#define ACE_ALLOCATOR_NEW_NORETURN(POINTER, CONSTRUCTOR)
 

Macro Definition Documentation

◆ ACE_ALLOCATOR_NEW

#define ACE_ALLOCATOR_NEW (   POINTER,
  CONSTRUCTOR,
  RET_VAL 
)
Value:
do { void* ptr = ACE_Allocator::instance ()->malloc (sizeof (CONSTRUCTOR)); \
if (ptr == 0) { POINTER = 0; errno = ENOMEM; return RET_VAL;} \
else { POINTER = new (ptr) CONSTRUCTOR; } \
} while (0)
unsigned char * POINTER
static ACE_Allocator * instance(void)
virtual void * malloc(size_type nbytes)=0

Definition at line 6 of file Allocation_Macros.h.

◆ ACE_ALLOCATOR_NEW_NORETURN

#define ACE_ALLOCATOR_NEW_NORETURN (   POINTER,
  CONSTRUCTOR 
)
Value:
do { void* ptr = ACE_Allocator::instance ()->malloc (sizeof (CONSTRUCTOR)); \
if (ptr == 0) { POINTER = 0; errno = ENOMEM;} \
else { (POINTER = new (POINTER) CONSTRUCTOR; } \
} while (0)
unsigned char * POINTER
static ACE_Allocator * instance(void)
virtual void * malloc(size_type nbytes)=0

Definition at line 16 of file Allocation_Macros.h.

◆ ACE_ALLOCATOR_NEW_RETURN

#define ACE_ALLOCATOR_NEW_RETURN (   POINTER,
  CONSTRUCTOR 
)
Value:
do { void* ptr = ACE_Allocator::instance ()->malloc (sizeof (CONSTRUCTOR)); \
if (ptr == 0) { POINTER = 0; errno = ENOMEM; return;} \
else { POINTER = new (POINTER) CONSTRUCTOR; } \
} while (0)
unsigned char * POINTER
static ACE_Allocator * instance(void)
virtual void * malloc(size_type nbytes)=0

Definition at line 11 of file Allocation_Macros.h.