UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Protected Member Functions | List of all members
SharedMem Class Reference

#include <memctl.H>

Inheritance diagram for SharedMem:
ObjectIPC MemBlock

Public Member Functions

 SharedMem (size_t volume)
 
 SharedMem (size_t volume, key_t shm_k)
 
virtual ~SharedMem ()
 
virtual size_t size ()
 
virtual void resize (size_t volume)
 
virtual void * ptr ()
 
virtual int attach_cnt ()
 
- Public Member Functions inherited from ObjectIPC
 ObjectIPC (key_t id_k)
 
virtual key_t key ()
 
- Public Member Functions inherited from MemBlock
virtual ~MemBlock ()
 
virtual void operator= (MemBlock &mem_blk)
 

Protected Member Functions

void coherency ()
 
- Protected Member Functions inherited from ObjectIPC
void new_key ()
 

Detailed Description

Shared memory service. Auto realloc behaviour.

Constructor & Destructor Documentation

SharedMem::SharedMem ( size_t  volume)

Allocate

SharedMem::SharedMem ( size_t  volume,
key_t  shm_k 
)

Attach

virtual SharedMem::~SharedMem ( )
virtual

Destroy shared memory page only if it is attached nowhere

Member Function Documentation

virtual int SharedMem::attach_cnt ( )
virtual

Returns count of attached processes (users)

Reimplemented from ObjectIPC.

void SharedMem::coherency ( )
protected

Check coherency of shm_id and key()

virtual void* SharedMem::ptr ( )
virtual

Return address of page in local space with autoattachement

Implements MemBlock.

virtual void SharedMem::resize ( size_t  volume)
virtual

Change size of page to new volume without any guarantee of saving data during resize

Implements MemBlock.

virtual size_t SharedMem::size ( )
virtual

Get size of allocated shmem page

Implements MemBlock.


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