Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

OS_Memory.h File Reference

#include "ace/ACE_export.h"
#include "ace/OS_Errno.h"
#include "ace/os_include/os_stddef.h"
#include "ace/OS_NS_stdlib.h"
#include "ace/OS_Memory.inl"

Include dependency graph for OS_Memory.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Efficiently compute aligned pointers to powers of 2 boundaries.

#define ACE_align_binary(ptr, alignment)   ((ptr + ((ptrdiff_t)((alignment)-1))) & (~((ptrdiff_t)((alignment)-1))))
 Return the next integer aligned to a required boundary.
#define ACE_ptr_align_binary(ptr, alignment)   ((char *) ACE_align_binary (((ptrdiff_t) (ptr)), (alignment)))
 Return the next address aligned to a required boundary.

Defines

#define ACE_MALLOC_FUNC   ::malloc
#define ACE_CALLOC_FUNC   ::calloc
#define ACE_FREE_FUNC   ::free
#define ACE_REALLOC_FUNC   ::realloc
#define ACE_NEW_RETURN(POINTER, CONSTRUCTOR, RET_VAL)
#define ACE_NEW(POINTER, CONSTRUCTOR)
#define ACE_NEW_NORETURN(POINTER, CONSTRUCTOR)
#define ACE_throw_bad_alloc
#define ACE_INLINE   inline

Variables

ACE_BEGIN_VERSIONED_NAMESPACE_DECL
typedef void * 
ACE_MALLOC_T

Detailed Description

Id
OS_Memory.h,v 4.26 2005/11/24 09:48:54 ossama Exp

Author:
Doug Schmidt <schmidt@cs.wustl.edu>

Jesper S. M|ller<stophph@diku.dk>

and a cast of thousands...


Define Documentation

#define ACE_align_binary ptr,
alignment   )     ((ptr + ((ptrdiff_t)((alignment)-1))) & (~((ptrdiff_t)((alignment)-1))))
 

Return the next integer aligned to a required boundary.

Parameters:
ptr the base pointer
alignment the required alignment

#define ACE_CALLOC_FUNC   ::calloc
 

#define ACE_FREE_FUNC   ::free
 

#define ACE_INLINE   inline
 

#define ACE_MALLOC_FUNC   ::malloc
 

#define ACE_NEW POINTER,
CONSTRUCTOR   ) 
 

Value:

do { POINTER = new CONSTRUCTOR; \
     if (POINTER == 0) { errno = ENOMEM; return; } \
   } while (0)

#define ACE_NEW_NORETURN POINTER,
CONSTRUCTOR   ) 
 

Value:

do { POINTER = new CONSTRUCTOR; \
     if (POINTER == 0) { errno = ENOMEM; } \
   } while (0)

#define ACE_NEW_RETURN POINTER,
CONSTRUCTOR,
RET_VAL   ) 
 

Value:

do { POINTER = new CONSTRUCTOR; \
     if (POINTER == 0) { errno = ENOMEM; return RET_VAL; } \
   } while (0)

#define ACE_ptr_align_binary ptr,
alignment   )     ((char *) ACE_align_binary (((ptrdiff_t) (ptr)), (alignment)))
 

Return the next address aligned to a required boundary.

#define ACE_REALLOC_FUNC   ::realloc
 

#define ACE_throw_bad_alloc
 

Value:

void* gcc_will_complain_if_literal_0_is_returned = 0; \
  return gcc_will_complain_if_literal_0_is_returned


Variable Documentation

ACE_BEGIN_VERSIONED_NAMESPACE_DECL typedef void* ACE_MALLOC_T
 


Generated on Tue Dec 20 22:52:03 2005 for ACE by  doxygen 1.3.9.1