NAME

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

SYNOPSIS

#include <ace/MEM_SAP.h>

class ACE_MEM_SAP { public: typedef ACE_Malloc_T<ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex, ACE_PI_Control_Block> MALLOC_TYPE; typedef ACE_Malloc_T<ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex, ACE_Control_Block> MALLOC_TYPE; typedef ACE_MMAP_Memory_Pool_Options MALLOC_OPTIONS; ~ACE_MEM_SAP (void); void *acquire_buffer (const ssize_t size); int release_buffer (void *buf); off_t set_buf_len (void *buf, size_t n); ssize_t get_buf_len (const off_t off, void *&buf); int remove (void); void dump (void) const; ACE_ALLOC_HOOK_DECLARE; protected: int create_shm_malloc (LPCTSTR name, MALLOC_OPTIONS *options = 0); int close_shm_malloc (const int remove = 0); MALLOC_TYPE *shm_malloc_; ACE_MEM_SAP (void); };

Initialization and termination methods.

    typedef ACE_Malloc_T<ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex, ACE_PI_Control_Block> MALLOC_TYPE;
    

    typedef ACE_Malloc_T<ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex, ACE_Control_Block> MALLOC_TYPE;
    

typedef ACE_MMAP_Memory_Pool_Options MALLOC_OPTIONS;

~ACE_MEM_SAP (void);

void *acquire_buffer (const ssize_t size);

int release_buffer (void *buf);

off_t set_buf_len (void *buf, size_t n);

ssize_t get_buf_len (const off_t off, void *&buf);

int remove (void);

void dump (void) const;

ACE_ALLOC_HOOK_DECLARE;

Class initializing methods to create/connect to a shared memory pool.

int create_shm_malloc (LPCTSTR name, MALLOC_OPTIONS *options = 0);

int close_shm_malloc (const int remove = 0);

MALLOC_TYPE *shm_malloc_;

ACE_MEM_SAP (void);

AUTHOR

Nanbor Wang nanbor@cs.wustl.edu

LIBRARY

ace