#include <SharedMemoryAllocator.h>
Inherited by fesa::HeapAllocator, and fesa::MemoryMappedFileAllocator.
|
virtual void * | allocate (const std::string &name, std::size_t size)=0 |
|
virtual void * | map (const std::string &name, std::size_t size)=0 |
|
virtual void | unmap (const std::string &name, void *buffer, std::size_t size)=0 |
|
virtual void | destroy (const std::string &name)=0 |
|
virtual bool | exists (const std::string &name) const =0 |
|
Interface for shared memory allocators. A shared memory allocator is an object able to allocate memory which can be shared between processes (server/RT part of the framework).
virtual void* fesa::SharedMemoryAllocator::allocate |
( |
const std::string & |
name, |
|
|
std::size_t |
size |
|
) |
| |
|
pure virtual |
Allocates a named block of size bytes.
- Parameters
-
name | name of the block to allocate |
size | size, in bytes, of the block to allocate |
- Returns
- pointer to the allocated block
virtual void fesa::SharedMemoryAllocator::destroy |
( |
const std::string & |
name | ) |
|
|
pure virtual |
De-allocates a named block and destroy it.
- Parameters
-
virtual bool fesa::SharedMemoryAllocator::exists |
( |
const std::string & |
name | ) |
const |
|
pure virtual |
- Returns
- true if a block with such a name exists.
virtual void* fesa::SharedMemoryAllocator::map |
( |
const std::string & |
name, |
|
|
std::size_t |
size |
|
) |
| |
|
pure virtual |
Maps size bytes of memory to a named block.
- Parameters
-
- Exceptions
-
- Returns
- pointer to the mapped block
virtual void fesa::SharedMemoryAllocator::unmap |
( |
const std::string & |
name, |
|
|
void * |
buffer, |
|
|
std::size_t |
size |
|
) |
| |
|
pure virtual |
Removes an existing mapping on a named block.
- Parameters
-
name | name of the block |
buffer | pointer to the block |
size | size of the mapping |
The documentation for this class was generated from the following file: