ACE
6.1.0
|
Shared memory wrapper based on System V shared memory. More...
#include <Shared_Memory_SV.h>
Public Types | |
enum | { ACE_CREATE = IPC_CREAT, ACE_OPEN = 0 } |
Public Member Functions | |
ACE_Shared_Memory_SV (void) | |
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 (void) |
Close down the shared memory segment. | |
virtual int | remove (void) |
Remove the underlying shared memory segment. | |
virtual void * | malloc (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 (void) const |
Return the size of the shared memory segment. | |
virtual ACE_HANDLE | get_id (void) const |
void | dump (void) const |
Dump the state of an object. | |
Public Attributes | |
ACE_ALLOC_HOOK_DECLARE | |
Declare the dynamic allocation hooks. | |
Private Attributes | |
ACE_SV_Shared_Memory | shared_memory_ |
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.
ACE_Shared_Memory_SV::ACE_Shared_Memory_SV | ( | void | ) | [inline] |
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 ACE_Shared_Memory_SV::close | ( | void | ) | [virtual] |
Close down the shared memory segment.
Implements ACE_Shared_Memory.
void ACE_Shared_Memory_SV::dump | ( | void | ) | const |
Dump the state of an object.
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.
ACE_HANDLE ACE_Shared_Memory_SV::get_id | ( | void | ) | const [virtual] |
Return the ID of the shared memory segment (i.e., a System V shared memory internal id).
Implements ACE_Shared_Memory.
size_t ACE_Shared_Memory_SV::get_segment_size | ( | void | ) | const [virtual] |
Return the size of the shared memory segment.
Implements ACE_Shared_Memory.
void * ACE_Shared_Memory_SV::malloc | ( | size_t | = 0 | ) | [virtual] |
Create a new chuck of memory containing size bytes.
Implements ACE_Shared_Memory.
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] |
int ACE_Shared_Memory_SV::remove | ( | void | ) | [virtual] |
Remove the underlying shared memory segment.
Implements ACE_Shared_Memory.
Declare the dynamic allocation hooks.
This version is implemented with System V shared memory segments.