Orocos Real-Time Toolkit
2.9.0
|
A multi-reader multi-writer MemoryPool implementation. More...
#include <rtt/internal/rtt-internal-fwd.hpp>
Public Types | |
typedef T | value_t |
typedef unsigned int | size_type |
Public Member Functions | |
TsPool (unsigned int ssize, const T &sample=T()) | |
Creates a fixed size memory pool holding ssize blocks of memory that can hold an object of class T. More... | |
~TsPool () | |
void | clear () |
Clears all internal management data of this Memory Pool. More... | |
void | data_sample (const T &sample) |
Initializes every element of the pool with the given sample and clears the pool. More... | |
value_t * | allocate () |
bool | deallocate (T *Value) |
unsigned int | size () |
Return the number of elements that are available to be allocated. More... | |
unsigned int | capacity () |
The maximum number of elements available for allocation. More... | |
A multi-reader multi-writer MemoryPool implementation.
It can hold max 65535 elements of type T.
Definition at line 168 of file rtt-internal-fwd.hpp.
typedef unsigned int RTT::internal::TsPool< T >::size_type |
Definition at line 100 of file TsPool.hpp.
typedef T RTT::internal::TsPool< T >::value_t |
Definition at line 65 of file TsPool.hpp.
|
inline |
Creates a fixed size memory pool holding ssize blocks of memory that can hold an object of class T.
Definition at line 105 of file TsPool.hpp.
|
inline |
Definition at line 112 of file TsPool.hpp.
|
inline |
Definition at line 159 of file TsPool.hpp.
Referenced by RTT::base::BufferLockFree< T >::data_sample(), and RTT::base::BufferLockFree< T >::Push().
|
inline |
The maximum number of elements available for allocation.
Definition at line 222 of file TsPool.hpp.
|
inline |
Clears all internal management data of this Memory Pool.
All data blobs are considered to be owned by the pool again.
Definition at line 137 of file TsPool.hpp.
Referenced by RTT::internal::TsPool< Item >::data_sample().
|
inline |
Initializes every element of the pool with the given sample and clears the pool.
Definition at line 153 of file TsPool.hpp.
Referenced by RTT::base::BufferLockFree< T >::data_sample(), and RTT::internal::TsPool< Item >::TsPool().
|
inline |
Definition at line 179 of file TsPool.hpp.
Referenced by RTT::base::BufferLockFree< T >::clear(), RTT::base::BufferLockFree< T >::data_sample(), RTT::base::BufferLockFree< T >::Pop(), RTT::base::BufferLockFree< T >::Push(), and RTT::base::BufferLockFree< T >::Release().
|
inline |
Return the number of elements that are available to be allocated.
This function is not thread-safe and should not be used when concurrent allocate()/deallocate() functions are running.
Definition at line 205 of file TsPool.hpp.
Referenced by RTT::internal::TsPool< Item >::~TsPool().