Make a memory pool that is based on <sbrk(2)>.
More...
#include <Sbrk_Memory_Pool.h>
|
| ACE_Sbrk_Memory_Pool (const ACE_TCHAR *backing_store_name=0, const OPTIONS *options=0) |
| Initialize the pool. More...
|
|
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. More...
|
|
virtual void * | acquire (size_t nbytes, size_t &rounded_bytes) |
|
virtual int | release (int destroy=1) |
| Instruct the memory pool to release all of its resources. More...
|
|
virtual int | sync (ssize_t len=-1, int flags=MS_SYNC) |
|
virtual int | sync (void *addr, size_t len, int flags=MS_SYNC) |
|
virtual int | protect (ssize_t len=-1, int prot=PROT_RDWR) |
|
virtual int | protect (void *addr, size_t len, int prot=PROT_RDWR) |
|
virtual void | dump (void) const |
| Dump the state of an object. More...
|
|
virtual void * | base_addr (void) const |
|
Make a memory pool that is based on <sbrk(2)>.
ACE_Sbrk_Memory_Pool::ACE_Sbrk_Memory_Pool |
( |
const ACE_TCHAR * |
backing_store_name = 0 , |
|
|
const OPTIONS * |
options = 0 |
|
) |
| |
ACE_Sbrk_Memory_Pool::~ACE_Sbrk_Memory_Pool |
( |
void |
| ) |
|
|
virtual |
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::base_addr |
( |
void |
| ) |
const |
|
virtual |
Return the base address of this memory pool, 0 if base_addr never changes.
void ACE_Sbrk_Memory_Pool::dump |
( |
void |
| ) |
const |
|
virtual |
Dump the state of an object.
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.
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.
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 addr up to len bytes.
int ACE_Sbrk_Memory_Pool::release |
( |
int |
destroy = 1 | ) |
|
|
virtual |
Instruct the memory pool to release all of its resources.
size_t ACE_Sbrk_Memory_Pool::round_up |
( |
size_t |
nbytes | ) |
|
|
protectedvirtual |
Implement the algorithm for rounding up the request to an appropriate chunksize.
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.
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 addr.
ACE_Sbrk_Memory_Pool::ACE_ALLOC_HOOK_DECLARE |
Declare the dynamic allocation hooks.
The documentation for this class was generated from the following files: