#include <TsPool.hpp>
Classes | |
struct | Item |
union | Pointer_t |
Public Types | |
typedef unsigned int | size_type |
typedef unsigned int | size_type |
typedef T | value_t |
typedef T | value_t |
Public Member Functions | |
value_t * | allocate () |
value_t * | allocate () |
unsigned int | capacity () |
unsigned int | capacity () |
void | clear () |
void | clear () |
void | data_sample (const T &sample) |
void | data_sample (const T &sample) |
bool | deallocate (T *Value) |
bool | deallocate (T *Value) |
unsigned int | size () |
unsigned int | size () |
TsPool (unsigned int ssize, const T &sample=T()) | |
TsPool (unsigned int ssize, const T &sample=T()) | |
~TsPool () | |
~TsPool () | |
Private Attributes | |
Item | head |
Item * | pool |
unsigned int | pool_capacity |
unsigned int | pool_size |
A multi-reader multi-writer MemoryPool implementation. It can hold max 65535 elements of type T.
Definition at line 62 of file install/include/rtt/internal/TsPool.hpp.
typedef unsigned int RTT::internal::TsPool< T >::size_type |
Definition at line 100 of file rtt/internal/TsPool.hpp.
typedef unsigned int RTT::internal::TsPool< T >::size_type |
Definition at line 100 of file install/include/rtt/internal/TsPool.hpp.
typedef T RTT::internal::TsPool< T >::value_t |
Definition at line 65 of file rtt/internal/TsPool.hpp.
typedef T RTT::internal::TsPool< T >::value_t |
Definition at line 65 of file install/include/rtt/internal/TsPool.hpp.
RTT::internal::TsPool< T >::TsPool | ( | unsigned int | ssize, | |
const T & | sample = T() | |||
) | [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 install/include/rtt/internal/TsPool.hpp.
RTT::internal::TsPool< T >::~TsPool | ( | ) | [inline] |
Definition at line 112 of file install/include/rtt/internal/TsPool.hpp.
RTT::internal::TsPool< T >::TsPool | ( | unsigned int | ssize, | |
const T & | sample = T() | |||
) | [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 rtt/internal/TsPool.hpp.
RTT::internal::TsPool< T >::~TsPool | ( | ) | [inline] |
Definition at line 112 of file rtt/internal/TsPool.hpp.
value_t* RTT::internal::TsPool< T >::allocate | ( | ) | [inline] |
Definition at line 159 of file rtt/internal/TsPool.hpp.
value_t* RTT::internal::TsPool< T >::allocate | ( | ) | [inline] |
Definition at line 159 of file install/include/rtt/internal/TsPool.hpp.
unsigned int RTT::internal::TsPool< T >::capacity | ( | ) | [inline] |
The maximum number of elements available for allocation.
Definition at line 222 of file rtt/internal/TsPool.hpp.
unsigned int RTT::internal::TsPool< T >::capacity | ( | ) | [inline] |
The maximum number of elements available for allocation.
Definition at line 222 of file install/include/rtt/internal/TsPool.hpp.
void RTT::internal::TsPool< T >::clear | ( | ) | [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 rtt/internal/TsPool.hpp.
void RTT::internal::TsPool< T >::clear | ( | ) | [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 install/include/rtt/internal/TsPool.hpp.
void RTT::internal::TsPool< T >::data_sample | ( | const T & | sample | ) | [inline] |
Initializes every element of the pool with the given sample and clears the pool.
Definition at line 153 of file rtt/internal/TsPool.hpp.
void RTT::internal::TsPool< T >::data_sample | ( | const T & | sample | ) | [inline] |
Initializes every element of the pool with the given sample and clears the pool.
Definition at line 153 of file install/include/rtt/internal/TsPool.hpp.
bool RTT::internal::TsPool< T >::deallocate | ( | T * | Value | ) | [inline] |
Definition at line 179 of file rtt/internal/TsPool.hpp.
bool RTT::internal::TsPool< T >::deallocate | ( | T * | Value | ) | [inline] |
Definition at line 179 of file install/include/rtt/internal/TsPool.hpp.
unsigned int RTT::internal::TsPool< T >::size | ( | ) | [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 rtt/internal/TsPool.hpp.
unsigned int RTT::internal::TsPool< T >::size | ( | ) | [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 install/include/rtt/internal/TsPool.hpp.
Item RTT::internal::TsPool< T >::head [private] |
Definition at line 95 of file install/include/rtt/internal/TsPool.hpp.
Item * RTT::internal::TsPool< T >::pool [private] |
Definition at line 94 of file install/include/rtt/internal/TsPool.hpp.
unsigned int RTT::internal::TsPool< T >::pool_capacity [private] |
Definition at line 97 of file install/include/rtt/internal/TsPool.hpp.
unsigned int RTT::internal::TsPool< T >::pool_size [private] |
Definition at line 97 of file install/include/rtt/internal/TsPool.hpp.