#include <Memory_Pool.h>
Collaboration diagram for ACE_Pagefile_Memory_Pool:
Public Types | |
typedef ACE_Pagefile_Memory_Pool_Options | OPTIONS |
Public Methods | |
ACE_Pagefile_Memory_Pool (const ACE_TCHAR *backing_store_name=0, const OPTIONS *options=0) | |
Initialize the pool. | |
void * | init_acquire (size_t nbytes, size_t &rounded_bytes, int &first_time) |
Ask system for initial chunk of shared memory. | |
void * | acquire (size_t nbytes, size_t &rounded_bytes) |
int | release (int destroy=1) |
Instruct the memory pool to release all of its resources. | |
virtual int | seh_selector (void *) |
int | remap (void *addr) |
size_t | round_to_page_size (size_t nbytes) |
Round up to system page size. | |
size_t | round_to_chunk_size (size_t nbytes) |
Round up to the chunk size required by the operation system. | |
int | sync (ssize_t=-1, int=MS_SYNC) |
int | sync (void *, size_t, int=MS_SYNC) |
int | protect (ssize_t=-1, int=PROT_RDWR) |
int | protect (void *, size_t, int=PROT_RDWR) |
virtual void * | base_addr (void) const |
void | dump (void) const |
Protected Methods | |
int | map (int &firstTime, size_t appendBytes=0) |
int | unmap (void) |
Release the mapping. | |
Private Attributes | |
Control_Block | local_cb_ |
Description of what our process mapped. | |
Control_Block * | shared_cb_ |
Shared memory pool statistics. | |
ACE_HANDLE | object_handle_ |
File mapping handle. | |
size_t | page_size_ |
System page size. | |
ACE_TCHAR | backing_store_name_ [MAXPATHLEN] |
Name of the backing store where the shared memory pool is kept. |
|
|
|
Initialize the pool.
|
|
Acquire at least <nbytes> from the memory pool. <rounded_bytes> is the actual number of bytes allocated. |
|
Return the base address of this memory pool, 0 if base_addr never changes. |
|
|
|
Ask system for initial chunk of shared memory.
|
|
Map portions or the entire pool into the local virtual address space. To do this, we compute the new <file_offset> of the backing store and commit the memory. |
|
|
|
|
|
Instruct the memory pool to release all of its resources.
|
|
Try to extend the virtual address space so that <addr> is now covered by the address mapping. The method succeeds and returns 0 if the backing store has adequate memory to cover this address. Otherwise, it returns -1. This method is typically called by an exception handler for a Win32 structured exception when another process has grown the backing store (and its mapping) and our process now incurs a fault because our mapping isn't in range (yet). |
|
Round up to the chunk size required by the operation system.
|
|
Round up to system page size.
|
|
Win32 Structural exception selector. The return value decides how to handle memory pool related structural exceptions. Returns 1, 0, or , -1. |
|
|
|
|
|
Release the mapping.
|
|
Name of the backing store where the shared memory pool is kept.
|
|
Description of what our process mapped.
|
|
File mapping handle.
|
|
System page size.
|
|
Shared memory pool statistics.
|