ACE  6.3.3
Public Types | Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | List of all members
ACE_SV_Shared_Memory Class Reference

This is a wrapper for System V shared memory. More...

#include <SV_Shared_Memory.h>

Public Types

enum  { ACE_CREATE = IPC_CREAT, ACE_OPEN = 0 }
 

Public Member Functions

 ACE_SV_Shared_Memory (void)
 
 ACE_SV_Shared_Memory (key_t external_id, size_t size, int create, int perms=ACE_DEFAULT_FILE_PERMS, void *virtual_addr=0, int flags=0)
 
 ACE_SV_Shared_Memory (ACE_HANDLE internal_id, int flags=0)
 
int open (key_t external_id, size_t size, int create=ACE_SV_Shared_Memory::ACE_OPEN, int perms=ACE_DEFAULT_FILE_PERMS)
 
int open_and_attach (key_t external_id, size_t size, int create=ACE_SV_Shared_Memory::ACE_OPEN, int perms=ACE_DEFAULT_FILE_PERMS, void *virtual_addr=0, int flags=0)
 
int attach (void *virtual_addr=0, int flags=0)
 Attach this shared memory segment. More...
 
int detach (void)
 Detach this shared memory segment. More...
 
int remove (void)
 Remove this shared memory segment. More...
 
int control (int cmd, void *buf)
 Forward to underlying System V <shmctl>. More...
 
void * get_segment_ptr (void) const
 
size_t get_segment_size (void) const
 
ACE_HANDLE get_id (void) const
 Return the ID of the shared memory segment (i.e., an ACE_HANDLE). 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 Types

enum  { ALIGN_WORDB = 8 }
 

Protected Member Functions

size_t round_up (size_t len)
 Round up to an appropriate page size. More...
 

Protected Attributes

ACE_HANDLE internal_id_
 Internal identifier. More...
 
size_t size_
 Size of the mapped segment. More...
 
void * segment_ptr_
 Pointer to the beginning of the segment. More...
 

Detailed Description

This is a wrapper for System V shared memory.

Member Enumeration Documentation

anonymous enum
Enumerator
ACE_CREATE 
ACE_OPEN 
anonymous enum
protected
Enumerator
ALIGN_WORDB 

Most restrictive alignment.

Constructor & Destructor Documentation

ACE_SV_Shared_Memory::ACE_SV_Shared_Memory ( void  )
ACE_SV_Shared_Memory::ACE_SV_Shared_Memory ( key_t  external_id,
size_t  size,
int  create,
int  perms = ACE_DEFAULT_FILE_PERMS,
void *  virtual_addr = 0,
int  flags = 0 
)
ACE_SV_Shared_Memory::ACE_SV_Shared_Memory ( ACE_HANDLE  internal_id,
int  flags = 0 
)

Member Function Documentation

int ACE_SV_Shared_Memory::attach ( void *  virtual_addr = 0,
int  flags = 0 
)
inline

Attach this shared memory segment.

int ACE_SV_Shared_Memory::control ( int  cmd,
void *  buf 
)
inline

Forward to underlying System V <shmctl>.

int ACE_SV_Shared_Memory::detach ( void  )
inline

Detach this shared memory segment.

void ACE_SV_Shared_Memory::dump ( void  ) const

Dump the state of an object.

ACE_HANDLE ACE_SV_Shared_Memory::get_id ( void  ) const
inline

Return the ID of the shared memory segment (i.e., an ACE_HANDLE).

void * ACE_SV_Shared_Memory::get_segment_ptr ( void  ) const
inline
size_t ACE_SV_Shared_Memory::get_segment_size ( void  ) const
inline
int ACE_SV_Shared_Memory::open ( key_t  external_id,
size_t  size,
int  create = ACE_SV_Shared_Memory::ACE_OPEN,
int  perms = ACE_DEFAULT_FILE_PERMS 
)
inline
int ACE_SV_Shared_Memory::open_and_attach ( key_t  external_id,
size_t  size,
int  create = ACE_SV_Shared_Memory::ACE_OPEN,
int  perms = ACE_DEFAULT_FILE_PERMS,
void *  virtual_addr = 0,
int  flags = 0 
)
int ACE_SV_Shared_Memory::remove ( void  )
inline

Remove this shared memory segment.

size_t ACE_SV_Shared_Memory::round_up ( size_t  len)
inlineprotected

Round up to an appropriate page size.

Member Data Documentation

ACE_SV_Shared_Memory::ACE_ALLOC_HOOK_DECLARE

Declare the dynamic allocation hooks.

ACE_HANDLE ACE_SV_Shared_Memory::internal_id_
protected

Internal identifier.

void* ACE_SV_Shared_Memory::segment_ptr_
protected

Pointer to the beginning of the segment.

size_t ACE_SV_Shared_Memory::size_
protected

Size of the mapped segment.


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