#include <Shared_Memory_SV.h>
Inheritance diagram for ACE_Shared_Memory_SV:


Public Types | |
| enum | { ACE_CREATE = IPC_CREAT, ACE_OPEN = 0 } |
Public Methods | |
| ACE_Shared_Memory_SV (void) | |
| ACE_Shared_Memory_SV (key_t id, int 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, int 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. More... | |
| virtual int | remove (void) |
| Remove the underlying shared memory segment. More... | |
| virtual void * | malloc (size_t=0) |
| Create a new chuck of memory containing <size> bytes. More... | |
| virtual int | free (void *p) |
| Free a chuck of memory allocated by <ACE_Shared_Memory_SV::malloc>. More... | |
| virtual int | get_segment_size (void) const |
| Return the size of the shared memory segment. More... | |
| virtual ACE_HANDLE | get_id (void) const |
| Return the ID of the shared memory segment (i.e., a System V shared memory internal id). More... | |
| void | dump (void) const |
| Dump the state of an object. More... | |
Public Attributes | |
| ACE_ALLOC_HOOK_DECLARE | |
| Declare the dynamic allocation hooks. More... | |
Private Attributes | |
| ACE_SV_Shared_Memory | shared_memory_ |
| This version is implemented with System V shared memory segments. More... | |
This class provides a very simple-minded shared memory manager. For more a powerful memory allocator please see <ACE_Malloc>.
Definition at line 35 of file Shared_Memory_SV.h.
|
|
Definition at line 38 of file Shared_Memory_SV.h.
00039 {
00040 ACE_CREATE = IPC_CREAT,
00041 ACE_OPEN = 0
00042 };
|
|
|
Definition at line 65 of file Shared_Memory_SV.i. References ACE_TRACE.
00066 {
00067 ACE_TRACE ("ACE_Shared_Memory_SV::ACE_Shared_Memory_SV");
00068 }
|
|
||||||||||||||||||||||||||||
|
Definition at line 21 of file Shared_Memory_SV.cpp. References ACE_TRACE.
00027 : shared_memory_ (id, length, create, perms, addr, flags) 00028 { 00029 ACE_TRACE ("ACE_Shared_Memory_SV::ACE_Shared_Memory_SV"); 00030 } |
|
|
Close down the shared memory segment.
Implements ACE_Shared_Memory. Definition at line 42 of file Shared_Memory_SV.i. References ACE_TRACE, ACE_SV_Shared_Memory::detach, and shared_memory_.
00043 {
00044 ACE_TRACE ("ACE_Shared_Memory_SV::close");
00045 return shared_memory_.detach ();
00046 }
|
|
|
Dump the state of an object.
Definition at line 16 of file Shared_Memory_SV.cpp. References ACE_TRACE.
00017 {
00018 ACE_TRACE ("ACE_Shared_Memory_SV::dump");
00019 }
|
|
|
Free a chuck of memory allocated by <ACE_Shared_Memory_SV::malloc>.
Implements ACE_Shared_Memory. Definition at line 71 of file Shared_Memory_SV.i. References ACE_TRACE.
00072 {
00073 ACE_TRACE ("ACE_Shared_Memory_SV::free");
00074 return p != 0;
00075 }
|
|
|
Return the ID of the shared memory segment (i.e., a System V shared memory internal id).
Implements ACE_Shared_Memory. Definition at line 56 of file Shared_Memory_SV.i. References ACE_TRACE, ACE_SV_Shared_Memory::get_id, and shared_memory_.
00057 {
00058 ACE_TRACE ("ACE_Shared_Memory_SV::get_id");
00059 return this->shared_memory_.get_id ();
00060 }
|
|
|
Return the size of the shared memory segment.
Implements ACE_Shared_Memory. Definition at line 22 of file Shared_Memory_SV.i. References ACE_TRACE.
00023 {
00024 ACE_TRACE ("ACE_Shared_Memory_SV::get_segment_size");
00025 // This cast is ok since the 'open' method for this class allows only
00026 // an 'int' size. Therefore, this case should not lose information.
00027 return ACE_static_cast (int, this->shared_memory_.get_segment_size ());
00028 }
|
|
|
Create a new chuck of memory containing <size> bytes.
Implements ACE_Shared_Memory. Definition at line 49 of file Shared_Memory_SV.i. References ACE_TRACE, ACE_SV_Shared_Memory::get_segment_ptr, and shared_memory_.
00050 {
00051 ACE_TRACE ("ACE_Shared_Memory_SV::malloc");
00052 return this->shared_memory_.get_segment_ptr ();
00053 }
|
|
||||||||||||||||||||||||||||
|
Definition at line 7 of file Shared_Memory_SV.i. References ACE_TRACE, ACE_SV_Shared_Memory::open_and_attach, and shared_memory_.
00013 {
00014 ACE_TRACE ("ACE_Shared_Memory_SV::open");
00015 return shared_memory_.open_and_attach (id, length, create,
00016 perms, addr, flags);
00017 }
|
|
|
Remove the underlying shared memory segment.
Implements ACE_Shared_Memory. Definition at line 33 of file Shared_Memory_SV.i. References ACE_TRACE, ACE_SV_Shared_Memory::remove, and shared_memory_.
00034 {
00035 ACE_TRACE ("ACE_Shared_Memory_SV::remove");
00036 return shared_memory_.remove ();
00037 }
|
|
|
Declare the dynamic allocation hooks.
Definition at line 84 of file Shared_Memory_SV.h. |
|
|
This version is implemented with System V shared memory segments.
Definition at line 89 of file Shared_Memory_SV.h. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002