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

# ACE_MEM_SAP Class Reference

Defines the methods of shared memory management for shared memory transport. More...

`#include <MEM_SAP.h>`

Inheritance diagram for ACE_MEM_SAP:

[legend]
Collaboration diagram for ACE_MEM_SAP:

[legend]
List of all members.

## Public Types
typedef ACE_Malloc_T< ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex, ACE_PI_Control_Block > | MALLOC_TYPE
typedef ACE_MMAP_Memory_Pool_Options | MALLOC_OPTIONS
## Public Methods
virtual | ~ACE_MEM_SAP (void)
| Destructor. More...
virtual int | init (ACE_HANDLE handle, const ACE_TCHAR *name, MALLOC_OPTIONS *options)=0
| Initialize the MEM_SAP object. More...
virtual int | fini ()
| Finalizing the MEM_SAP object. More...
virtual int | recv_buf (ACE_MEM_SAP_Node *&buf, int flags, const ACE_Time_Value *timeout)=0
| Fetch location of next available data into <recv_buffer_>. More...
virtual int | send_buf (ACE_MEM_SAP_Node *buf, int flags, const ACE_Time_Value *timeout)=0
| Wait to to <timeout> amount of time to send <buf>. More...
ACE_MEM_SAP_Node * | acquire_buffer (const ssize_t size)
| request a buffer of size <size>. Return 0 if the <shm_malloc_> is not initialized. More...
int | release_buffer (ACE_MEM_SAP_Node *buf)
| release a buffer pointed by <buf>. Return -1 if the <shm_malloc_> is not initialized. More...
void | dump (void) const
| Dump the state of an object. More...
## Public Attributes
| ACE_ALLOC_HOOK_DECLARE
| Declare the dynamic allocation hooks. More...
## Protected Methods
int | create_shm_malloc (const ACE_TCHAR *name, MALLOC_OPTIONS *options)
| Create a new shm_malloc object. More...
int | close_shm_malloc (void)
| Close down the share memory pool. Clean up the mmap file if we are the last one using it. More...
| ACE_MEM_SAP (void)
| Constructor. Prevent this class from being instantiated. More...
## Protected Attributes
ACE_HANDLE | handle_
MALLOC_TYPE * | shm_malloc_
| Data exchange channel. More...

## Detailed Description

Defines the methods of shared memory management for shared memory transport.

## Member Typedef Documentation

typedef ACE_MMAP_Memory_Pool_Options ACE_MEM_SAP::MALLOC_OPTIONS

typedef ACE_Malloc_T<ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex, ACE_PI_Control_Block> ACE_MEM_SAP::MALLOC_TYPE

## Constructor & Destructor Documentation

ASYS_INLINE ACE_MEM_SAP::~ACE_MEM_SAP | ( | void |  | ) | `[virtual]`

| Destructor.

ACE_MEM_SAP::ACE_MEM_SAP | ( | void |  | ) | `[protected]`

| Constructor. Prevent this class from being instantiated.

## Member Function Documentation

ASYS_INLINE ACE_MEM_SAP_Node * ACE_MEM_SAP::acquire_buffer | ( | const ssize_t | size | ) |

| request a buffer of size <size>. Return 0 if the <shm_malloc_> is not initialized.

int ACE_MEM_SAP::close_shm_malloc | ( | void |  | ) | `[protected]`

| Close down the share memory pool. Clean up the mmap file if we are the last one using it.

int ACE_MEM_SAP::create_shm_malloc | ( | const ACE_TCHAR * | name,
|  | MALLOC_OPTIONS * | options
| ) | `[protected]`

| Create a new shm_malloc object. Return 0 if succeed and -1 otherwise. This method should only be called from an acceptor class that wants to create a new memory pool for inter process communication.

void ACE_MEM_SAP::dump | ( | void |  | ) | const

| Dump the state of an object.

int ACE_MEM_SAP::fini | ( |  | ) | `[virtual]`

| Finalizing the MEM_SAP object. This method doesn't invoke the <remove> method.

virtual int ACE_MEM_SAP::init | ( | ACE_HANDLE | handle,
|  | const ACE_TCHAR * | name,
|  | MALLOC_OPTIONS * | options
| ) | `[pure virtual]`

| Initialize the MEM_SAP object. Reimplemented in ACE_Reactive_MEM_IO, and ACE_MT_MEM_IO.

virtual int ACE_MEM_SAP::recv_buf | ( | ACE_MEM_SAP_Node *& | buf,
|  | int | flags,
|  | const ACE_Time_Value * | timeout
| ) | `[pure virtual]`

| Fetch location of next available data into <recv_buffer_>. As this operation read the address of the data off the socket using ACE::recv, <timeout> only applies to ACE::recv. Reimplemented in ACE_Reactive_MEM_IO, and ACE_MT_MEM_IO.

ASYS_INLINE int ACE_MEM_SAP::release_buffer | ( | ACE_MEM_SAP_Node * | buf | ) |

| release a buffer pointed by <buf>. Return -1 if the <shm_malloc_> is not initialized.

virtual int ACE_MEM_SAP::send_buf | ( | ACE_MEM_SAP_Node * | buf,
|  | int | flags,
|  | const ACE_Time_Value * | timeout
| ) | `[pure virtual]`

| Wait to to <timeout> amount of time to send <buf>. If <send> times out a -1 is returned with <errno == ETIME>. If it succeeds the number of bytes sent is returned. Reimplemented in ACE_Reactive_MEM_IO, and ACE_MT_MEM_IO.

## Member Data Documentation

ACE_MEM_SAP::ACE_ALLOC_HOOK_DECLARE

| Declare the dynamic allocation hooks.

ACE_HANDLE ACE_MEM_SAP::handle_`[protected]`

MALLOC_TYPE* ACE_MEM_SAP::shm_malloc_`[protected]`

| Data exchange channel.

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

- MEM_SAP.h
- MEM_SAP.cpp
- MEM_SAP.i