|
| T * | get (void) |
| | Request a typed reusable object from the free list or mapped space. More...
|
| |
| T * | getLocked (void) |
| | Used to get a typed object from the reuse pool when the mutex lock is already held. More...
|
| |
| T * | getTimed (timeout_t timeout) |
| | Request a typed reusable object from the free list or mapped space. More...
|
| |
| void | initialize (void) |
| | Initialize typed data in mapped array. More...
|
| |
| | mapped_reuse (const char *name, unsigned number) |
| | Construct mapped reuse array of typed objects. More...
|
| |
| | operator bool () const |
| | Check whether there are typed objects available to be allocated. More...
|
| |
| | operator T* () |
| | Request a typed reusable object from the free list or mapped space. More...
|
| |
| bool | operator! () const |
| | Check whether there are typed objects available to be allocated. More...
|
| |
| T * | operator* () |
| | Request a typed reusable object from the free list or mapped space by pointer reference. More...
|
| |
| T * | pos (size_t member) |
| | Get typed object from a specific member offset within the mapped segment. More...
|
| |
| void | release (T *object) |
| | Used to release a typed object back to the reuse typed object pool. More...
|
| |
| void | removeLocked (T *object) |
| | Used to return a typed object to the reuse pool when the mutex lock is already held. More...
|
| |
| T * | request (void) |
| | Request a typed reusable object from the free list or mapped space. More...
|
| |
| bool | avail (void) const |
| | Check whether there are objects available to be allocated. More...
|
| |
| ReusableObject * | get (void) |
| | Request a reusable object from the free list or mapped space. More...
|
| |
| ReusableObject * | getLocked (void) |
| | Used to get an object from the reuse pool when the mutex lock is already held. More...
|
| |
| ReusableObject * | getTimed (timeout_t timeout) |
| | Request a reusable object from the free list or mapped space. More...
|
| |
| | MappedReuse (const char *name, size_t size, unsigned count) |
| | Construct a named memory segment for use with managed fixed size reusable objects. More...
|
| |
| void | removeLocked (ReusableObject *object) |
| | Used to return an object to the reuse pool when the mutex lock is already held. More...
|
| |
| ReusableObject * | request (void) |
| | Request a reusable object from the free list or mapped space. More...
|
| |
|
|
void | create (const char *fname, unsigned count) |
| |
|
| MappedReuse (size_t osize) |
| |
| ReusableObject * | next (ReusableObject *object) |
| | Get next reusable object in the pool. More...
|
| |
| void | release (ReusableObject *object) |
| | Release resuable object. More...
|
| |
| | ReusableAllocator () |
| | Initialize reusable allocator through a conditional. More...
|
| |
|
void | broadcast (void) |
| | Signal the conditional to release all waiting threads.
|
| |
|
| Conditional () |
| | Initialize and construct conditional.
|
| |
|
void | signal (void) |
| | Signal the conditional to release one waiting thread.
|
| |
| bool | wait (timeout_t timeout) |
| | Conditional wait for signal on millisecond timeout. More...
|
| |
| bool | wait (struct timespec *timeout) |
| | Conditional wait for signal on timespec timeout. More...
|
| |
|
void | wait (void) |
| | Wait (block) until signalled.
|
| |
|
| ~Conditional () |
| | Destroy conditional, release any blocked threads.
|
| |
|
| ConditionMutex () |
| | Initialize and construct conditional.
|
| |
|
void | lock (void) |
| | Lock the conditional's supporting mutex.
|
| |
|
void | unlock (void) |
| | Unlock the conditional's supporting mutex.
|
| |
|
| ~ConditionMutex () |
| | Destroy conditional, release any blocked threads.
|
| |
| void | create (const char *name, size_t size=(size_t) 0) |
| | Supporting function to construct a new or access an existing shared memory segment. More...
|
| |
| caddr_t | addr (void) |
| | Get starting address of mapped segment. More...
|
| |
| bool | copy (size_t offset, void *buffer, size_t size) const |
| | Copy memory from specific offset within the mapped memory segment. More...
|
| |
| size_t | len (void) const |
| | Get size of mapped segment. More...
|
| |
| | MappedMemory (const char *name, size_t size) |
| | Construct a read/write access mapped shared segment of memory of a known size. More...
|
| |
| | MappedMemory (const char *name) |
| | Provide read-only mapped access to an existing named shared memory segment. More...
|
| |
| void * | offset (size_t offset) const |
| | Get memory from a specific offset within the mapped memory segment. More...
|
| |
| | operator bool () const |
| | Test if map active. More...
|
| |
| bool | operator! () const |
| | Test if map is inactive. More...
|
| |
|
void | release (void) |
| | Unmap memory segment.
|
| |
| void * | sbrk (size_t size) |
| | Extend size of managed heap on shared memory segment. More...
|
| |
|
virtual | ~MappedMemory () |
| | Unmap memory segment.
|
| |
| static pthread_condattr_t * | initializer (void) |
| | Support function for getting conditional attributes for realtime scheduling. More...
|
| |
| static void | set (struct timespec *hires, timeout_t timeout) |
| | Convert a millisecond timeout into use for high resolution conditional timers. More...
|
| |
| static void | disable (void) |
| | An API that allows "disabling" of publishing shared memory maps. More...
|
| |
| static void | remove (const char *name) |
| | Destroy a previously existing memory segment under the specified name. More...
|
| |
|
ReusableObject * | freelist |
| |
|
unsigned | waiting |
| |
|
pthread_cond_t | cond |
| |
|
pthread_mutex_t | mutex |
| |
|
bool | erase |
| |
|
char | idname [65] |
| |
|
size_t | size |
| |
|
size_t | used |
| |
|
static attribute | attr |
| |
template<class T>
class ucommon::mapped_reuse< T >
Template class to map typed reusable objects into shared memory heap.
This is used to construct a read/write heap of objects that are held in a named shared memory segment. Member objects are allocated from a reusable heap but are stored in the shared memory segment as a vector.
- Author
- David Sugar dyfet.nosp@m.@gnu.nosp@m.telep.nosp@m.hony.nosp@m..org
Definition at line 347 of file mapped.h.