ACE 8.0.1
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ACE_Malloc< ACE_MEM_POOL_1, ACE_LOCK > Class Template Reference

#include <Malloc_T.h>

Inheritance diagram for ACE_Malloc< ACE_MEM_POOL_1, ACE_LOCK >:
Inheritance graph
[legend]
Collaboration diagram for ACE_Malloc< ACE_MEM_POOL_1, ACE_LOCK >:
Collaboration graph
[legend]

Public Member Functions

 ACE_Malloc (const ACE_TCHAR *pool_name=0)
 
 ACE_Malloc (const ACE_TCHAR *pool_name, const ACE_TCHAR *lock_name, const ACE_MEM_POOL_OPTIONS *options=0)
 
- Public Member Functions inherited from ACE_Malloc_T< ACE_MEM_POOL_2, ACE_LOCK, ACE_Control_Block >
 ACE_Malloc_T (const ACE_TCHAR *pool_name=0)
 
 ACE_Malloc_T (const ACE_TCHAR *pool_name, const ACE_TCHAR *lock_name, const ACE_MEM_POOL_OPTIONS *options=0)
 
 ACE_Malloc_T (const ACE_TCHAR *pool_name, const ACE_MEM_POOL_OPTIONS *options, ACE_LOCK *lock)
 
 ~ACE_Malloc_T ()
 Destructor.
 
int ref_counter ()
 Get Reference counter.
 
int release (int close=0)
 
int remove ()
 Releases resources allocated by this object.
 
voidmalloc (size_t nbytes)
 Allocate nbytes, but don't give them any initial value.
 
voidcalloc (size_t nbytes, char initial_value='\0')
 Allocate nbytes, giving them initial_value.
 
voidcalloc (size_t n_elem, size_t elem_size, char initial_value='\0')
 
void free (void *ptr)
 
MEMORY_POOLmemory_pool ()
 Returns a reference to the underlying memory pool.
 
int bind (const char *name, void *pointer, int duplicates=0)
 
int trybind (const char *name, void *&pointer)
 
int find (const char *name, void *&pointer)
 
int find (const char *name)
 Returns 0 if name is in the mapping. -1, otherwise.
 
int unbind (const char *name)
 
int unbind (const char *name, void *&pointer)
 
int sync (ssize_t len=-1, int flags=MS_SYNC)
 
int sync (void *addr, size_t len, int flags=MS_SYNC)
 
int protect (ssize_t len=-1, int prot=PROT_RDWR)
 
int protect (void *addr, size_t len, int prot=PROT_RDWR)
 
ssize_t avail_chunks (size_t size) const
 
ACE_LOCK & mutex ()
 
void dump () const
 Dump the state of an object.
 
voidbase_addr ()
 Return cb_ptr value.
 
int bad ()
 

Additional Inherited Members

- Public Types inherited from ACE_Malloc_T< ACE_MEM_POOL_2, ACE_LOCK, ACE_Control_Block >
typedef ACE_MEM_POOL MEMORY_POOL
 
typedef ACE_MEM_POOL_OPTIONS MEMORY_POOL_OPTIONS
 
typedef ACE_CB::ACE_Name_Node NAME_NODE
 
typedef ACE_CB::ACE_Malloc_Header MALLOC_HEADER
 
- Public Attributes inherited from ACE_Malloc_T< ACE_MEM_POOL_2, ACE_LOCK, ACE_Control_Block >
 ACE_ALLOC_HOOK_DECLARE
 Declare the dynamic allocation hooks.
 

Constructor & Destructor Documentation

◆ ACE_Malloc() [1/2]

template<ACE_MEM_POOL_1 , class ACE_LOCK >
ACE_Malloc< ACE_MEM_POOL_1, ACE_LOCK >::ACE_Malloc ( const ACE_TCHAR * pool_name = 0)
inline

Initialize ACE_Malloc. This constructor passes pool_name to initialize the memory pool, and uses ACE::basename() to automatically extract out the name used for the underlying lock name (if necessary). Note that pool_name should be located in a directory with the appropriate visibility and protection so that all processes that need to access it can do so.

◆ ACE_Malloc() [2/2]

template<ACE_MEM_POOL_1 , class ACE_LOCK >
ACE_Malloc< ACE_MEM_POOL_1, ACE_LOCK >::ACE_Malloc ( const ACE_TCHAR * pool_name,
const ACE_TCHAR * lock_name,
const ACE_MEM_POOL_OPTIONS * options = 0 )
inline

Initialize ACE_Malloc. This constructor passes pool_name to initialize the memory pool, and uses lock_name to automatically extract out the name used for the underlying lock name (if necessary). In addition, options is passed through to initialize the underlying memory pool. Note that pool_name should be located in a directory with the appropriate visibility and protection so that all processes that need to access it can do so.


The documentation for this class was generated from the following files: