Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

ACE_Sbrk_Memory_Pool Class Reference

Make a memory pool that is based on <sbrk(2)>. More...

#include <Memory_Pool.h>

List of all members.

Public Types

typedef ACE_Sbrk_Memory_Pool_Options OPTIONS

Public Methods

 ACE_Sbrk_Memory_Pool (const ACE_TCHAR *backing_store_name = 0, const OPTIONS *options = 0)
 Initialize the pool.

virtual ~ACE_Sbrk_Memory_Pool (void)
virtual void* init_acquire (size_t nbytes, size_t &rounded_bytes, int &first_time)
 Ask system for initial chunk of local memory.

virtual void* acquire (size_t nbytes, size_t &rounded_bytes)
 Acquire at least NBYTES from the memory pool. ROUNDED_BYTES is the actual number of bytes allocated.

virtual int release (void)
 Instruct the memory pool to release all of its resources.

virtual int sync (ssize_t len = -1, int flags = MS_SYNC)
virtual int sync (void *addr, size_t len, int flags = MS_SYNC)
 Sync <len> bytes of the memory region to the backing store starting at .

virtual int protect (ssize_t len = -1, int prot = PROT_RDWR)
virtual int protect (void *addr, size_t len, int prot = PROT_RDWR)
 Change the protection of the pages of the mapped region to <prot> starting at up to <len> bytes.

virtual void dump (void) const
 Dump the state of an object.


Public Attributes

 ACE_ALLOC_HOOK_DECLARE
 Declare the dynamic allocation hooks.


Protected Methods

virtual size_t round_up (size_t nbytes)
 Implement the algorithm for rounding up the request to an appropriate chunksize.


Detailed Description

Make a memory pool that is based on <sbrk(2)>.


Member Typedef Documentation

typedef ACE_Sbrk_Memory_Pool_Options ACE_Sbrk_Memory_Pool::OPTIONS
 


Constructor & Destructor Documentation

ACE_Sbrk_Memory_Pool::ACE_Sbrk_Memory_Pool ( const ACE_TCHAR * backing_store_name = 0,
const OPTIONS * options = 0 )
 

Initialize the pool.

ACE_INLINE ACE_Sbrk_Memory_Pool::~ACE_Sbrk_Memory_Pool ( void ) [virtual]
 


Member Function Documentation

void * ACE_Sbrk_Memory_Pool::acquire ( size_t nbytes,
size_t & rounded_bytes ) [virtual]
 

Acquire at least NBYTES from the memory pool. ROUNDED_BYTES is the actual number of bytes allocated.

void ACE_Sbrk_Memory_Pool::dump ( void ) const [virtual]
 

Dump the state of an object.

ACE_INLINE void * ACE_Sbrk_Memory_Pool::init_acquire ( size_t nbytes,
size_t & rounded_bytes,
int & first_time ) [virtual]
 

Ask system for initial chunk of local memory.

ACE_INLINE int ACE_Sbrk_Memory_Pool::protect ( void * addr,
size_t len,
int prot = PROT_RDWR ) [virtual]
 

Change the protection of the pages of the mapped region to <prot> starting at up to <len> bytes.

ACE_INLINE int ACE_Sbrk_Memory_Pool::protect ( ssize_t len = -1,
int prot = PROT_RDWR ) [virtual]
 

Change the protection of the pages of the mapped region to <prot> starting at <this->base_addr_> up to <len> bytes. If <len> == -1 then change protection of all pages in the mapped region.

ACE_INLINE int ACE_Sbrk_Memory_Pool::release ( void ) [virtual]
 

Instruct the memory pool to release all of its resources.

ACE_INLINE size_t ACE_Sbrk_Memory_Pool::round_up ( size_t nbytes ) [protected, virtual]
 

Implement the algorithm for rounding up the request to an appropriate chunksize.

ACE_INLINE int ACE_Sbrk_Memory_Pool::sync ( void * addr,
size_t len,
int flags = MS_SYNC ) [virtual]
 

Sync <len> bytes of the memory region to the backing store starting at .

ACE_INLINE int ACE_Sbrk_Memory_Pool::sync ( ssize_t len = -1,
int flags = MS_SYNC ) [virtual]
 

Sync <len> bytes of the memory region to the backing store starting at <this->base_addr_>. If <len> == -1 then sync the whole region.


Member Data Documentation

ACE_Sbrk_Memory_Pool::ACE_ALLOC_HOOK_DECLARE
 

Declare the dynamic allocation hooks.


The documentation for this class was generated from the following files:
Generated at Fri Oct 5 07:04:19 2001 for ACE by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000