ACE 8.0.1
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | Private Attributes | List of all members
ACE_Shared_Memory_SV Class Reference

Shared memory wrapper based on System V shared memory. More...

#include <Shared_Memory_SV.h>

Inheritance diagram for ACE_Shared_Memory_SV:
Inheritance graph
[legend]
Collaboration diagram for ACE_Shared_Memory_SV:
Collaboration graph
[legend]

Public Types

enum  { ACE_CREATE = IPC_CREAT , ACE_OPEN = 0 }
 

Public Member Functions

 ACE_Shared_Memory_SV ()
 
 ACE_Shared_Memory_SV (key_t id, size_t length, int create=ACE_Shared_Memory_SV::ACE_OPEN, int perms=ACE_DEFAULT_FILE_PERMS, void *addr=0, int flags=0)
 
int open (key_t id, size_t length, int create=ACE_Shared_Memory_SV::ACE_OPEN, int perms=ACE_DEFAULT_FILE_PERMS, void *addr=0, int flags=0)
 
virtual int close ()
 Close down the shared memory segment.
 
virtual int remove ()
 Remove the underlying shared memory segment.
 
virtual voidmalloc (size_t=0)
 Create a new chuck of memory containing size bytes.
 
virtual int free (void *p)
 Free a chuck of memory allocated by <ACE_Shared_Memory_SV::malloc>.
 
virtual size_t get_segment_size () const
 Return the size of the shared memory segment.
 
virtual ACE_HANDLE get_id () const
 
void dump () const
 Dump the state of an object.
 
- Public Member Functions inherited from ACE_Shared_Memory
virtual ~ACE_Shared_Memory ()
 

Public Attributes

 ACE_ALLOC_HOOK_DECLARE
 Declare the dynamic allocation hooks.
 

Private Attributes

ACE_SV_Shared_Memory shared_memory_
 

Detailed Description

Shared memory wrapper based on System V shared memory.

This class provides a very simple-minded shared memory manager. We strongly recommend that you do NOT use this class. Instead, please use ACE_Malloc, which has much more powerful capabilities.

Member Enumeration Documentation

◆ anonymous enum

Enumerator
ACE_CREATE 
ACE_OPEN 

Constructor & Destructor Documentation

◆ ACE_Shared_Memory_SV() [1/2]

ACE_Shared_Memory_SV::ACE_Shared_Memory_SV ( )
inline

◆ ACE_Shared_Memory_SV() [2/2]

ACE_Shared_Memory_SV::ACE_Shared_Memory_SV ( key_t id,
size_t length,
int create = ACE_Shared_Memory_SV::ACE_OPEN,
int perms = ACE_DEFAULT_FILE_PERMS,
void * addr = 0,
int flags = 0 )

Member Function Documentation

◆ close()

int ACE_Shared_Memory_SV::close ( )
virtual

Close down the shared memory segment.

Closes (detaches) the shared memory segment.

Implements ACE_Shared_Memory.

◆ dump()

void ACE_Shared_Memory_SV::dump ( ) const

Dump the state of an object.

◆ free()

int ACE_Shared_Memory_SV::free ( void * p)
virtual

Free a chuck of memory allocated by <ACE_Shared_Memory_SV::malloc>.

Implements ACE_Shared_Memory.

◆ get_id()

ACE_HANDLE ACE_Shared_Memory_SV::get_id ( ) const
virtual

Return the ID of the shared memory segment (i.e., a System V shared memory internal id).

Implements ACE_Shared_Memory.

◆ get_segment_size()

size_t ACE_Shared_Memory_SV::get_segment_size ( ) const
virtual

Return the size of the shared memory segment.

The overall size of the segment.

Implements ACE_Shared_Memory.

◆ malloc()

void * ACE_Shared_Memory_SV::malloc ( size_t = 0)
virtual

Create a new chuck of memory containing size bytes.

Implements ACE_Shared_Memory.

◆ open()

int ACE_Shared_Memory_SV::open ( key_t id,
size_t length,
int create = ACE_Shared_Memory_SV::ACE_OPEN,
int perms = ACE_DEFAULT_FILE_PERMS,
void * addr = 0,
int flags = 0 )
inline

◆ remove()

int ACE_Shared_Memory_SV::remove ( )
virtual

Remove the underlying shared memory segment.

Removes the shared memory segment.

Implements ACE_Shared_Memory.

Member Data Documentation

◆ ACE_ALLOC_HOOK_DECLARE

ACE_Shared_Memory_SV::ACE_ALLOC_HOOK_DECLARE

Declare the dynamic allocation hooks.

◆ shared_memory_

ACE_SV_Shared_Memory ACE_Shared_Memory_SV::shared_memory_
private

This version is implemented with System V shared memory segments.


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