#include <oro_allocator.hpp>
Classes | |
struct | pool_wrapper_type |
struct | rebind |
Public Types | |
typedef Alloc::const_pointer | const_pointer |
typedef Alloc::const_pointer | const_pointer |
typedef Alloc::const_reference | const_reference |
typedef Alloc::const_reference | const_reference |
typedef Alloc::difference_type | difference_type |
typedef Alloc::difference_type | difference_type |
typedef Alloc::pointer | pointer |
typedef Alloc::pointer | pointer |
typedef Alloc::reference | reference |
typedef Alloc::reference | reference |
typedef Alloc::size_type | size_type |
typedef Alloc::size_type | size_type |
typedef Alloc::value_type | value_type |
typedef Alloc::value_type | value_type |
Public Member Functions | |
const_pointer | address (const_reference x) const |
pointer | address (reference x) const |
const_pointer | address (const_reference x) const |
pointer | address (reference x) const |
pointer | allocate (size_type n, const_pointer hint=0) |
pointer | allocate (size_type n, const_pointer hint=0) |
void | construct (pointer p, const value_type &x) |
void | construct (pointer p, const value_type &x) |
void | deallocate (pointer p, size_type n) |
void | deallocate (pointer p, size_type n) |
void | destroy (pointer p) |
void | destroy (pointer p) |
void | grow (size_type n, const_pointer hint=0) |
void | grow (size_type n, const_pointer hint=0) |
template<class U , class A > | |
local_allocator (const local_allocator< U, A > &) | |
local_allocator (const local_allocator &) | |
local_allocator () | |
template<class U , class A > | |
local_allocator (const local_allocator< U, A > &) | |
local_allocator (const local_allocator &) | |
local_allocator () | |
size_type | max_size () const |
size_type | max_size () const |
void | shrink (size_type n) |
void | shrink (size_type n) |
~local_allocator () | |
~local_allocator () | |
Private Types | |
typedef pool_type::const_iterator | pool_cit |
typedef pool_type::const_iterator | pool_cit |
typedef pool_type::iterator | pool_it |
typedef pool_type::iterator | pool_it |
typedef std::multimap< size_t, pointer > | pool_type |
typedef std::multimap< size_t, pointer > | pool_type |
Private Member Functions | |
pointer | _grow (size_type n, const_pointer hint=0) |
pointer | _grow (size_type n, const_pointer hint=0) |
void | _shrink (pointer t, size_type n) |
void | _shrink (pointer t, size_type n) |
void | operator= (const local_allocator &) |
void | operator= (const local_allocator &) |
Private Attributes | |
Mutex | pool_lock |
Static Private Attributes | |
static pool_wrapper_type | pool |
A simple local allocator which keeps a small pool which you can grow manually with grow(). It delegates allocation to the Alloc for each allocation request, also if the pool is empty. The pool works on a per-type basis globally (static !). The pool is thus _not_ per-object. A per-object allocator is not allowed by the standard. The pool is deallocated upon global destruction.
T | the type to allocate memory for | |
Alloc | the allocator to delegate allocation to. |
Definition at line 63 of file install/include/rtt/os/oro_allocator.hpp.
typedef Alloc::const_pointer RTT::os::local_allocator< T, Alloc >::const_pointer |
Definition at line 52 of file rtt/os/oro_allocator.hpp.
typedef Alloc::const_pointer RTT::os::local_allocator< T, Alloc >::const_pointer |
Definition at line 52 of file install/include/rtt/os/oro_allocator.hpp.
typedef Alloc::const_reference RTT::os::local_allocator< T, Alloc >::const_reference |
Definition at line 54 of file rtt/os/oro_allocator.hpp.
typedef Alloc::const_reference RTT::os::local_allocator< T, Alloc >::const_reference |
Definition at line 54 of file install/include/rtt/os/oro_allocator.hpp.
typedef Alloc::difference_type RTT::os::local_allocator< T, Alloc >::difference_type |
Definition at line 56 of file rtt/os/oro_allocator.hpp.
typedef Alloc::difference_type RTT::os::local_allocator< T, Alloc >::difference_type |
Definition at line 56 of file install/include/rtt/os/oro_allocator.hpp.
typedef Alloc::pointer RTT::os::local_allocator< T, Alloc >::pointer |
Definition at line 51 of file rtt/os/oro_allocator.hpp.
typedef Alloc::pointer RTT::os::local_allocator< T, Alloc >::pointer |
Definition at line 51 of file install/include/rtt/os/oro_allocator.hpp.
typedef pool_type::const_iterator RTT::os::local_allocator< T, Alloc >::pool_cit [private] |
Definition at line 177 of file rtt/os/oro_allocator.hpp.
typedef pool_type::const_iterator RTT::os::local_allocator< T, Alloc >::pool_cit [private] |
Definition at line 177 of file install/include/rtt/os/oro_allocator.hpp.
typedef pool_type::iterator RTT::os::local_allocator< T, Alloc >::pool_it [private] |
Definition at line 176 of file rtt/os/oro_allocator.hpp.
typedef pool_type::iterator RTT::os::local_allocator< T, Alloc >::pool_it [private] |
Definition at line 176 of file install/include/rtt/os/oro_allocator.hpp.
typedef std::multimap< size_t, pointer> RTT::os::local_allocator< T, Alloc >::pool_type [private] |
Definition at line 175 of file rtt/os/oro_allocator.hpp.
typedef std::multimap< size_t, pointer> RTT::os::local_allocator< T, Alloc >::pool_type [private] |
Definition at line 175 of file install/include/rtt/os/oro_allocator.hpp.
typedef Alloc::reference RTT::os::local_allocator< T, Alloc >::reference |
Definition at line 53 of file rtt/os/oro_allocator.hpp.
typedef Alloc::reference RTT::os::local_allocator< T, Alloc >::reference |
Definition at line 53 of file install/include/rtt/os/oro_allocator.hpp.
typedef Alloc::size_type RTT::os::local_allocator< T, Alloc >::size_type |
Definition at line 55 of file rtt/os/oro_allocator.hpp.
typedef Alloc::size_type RTT::os::local_allocator< T, Alloc >::size_type |
Definition at line 55 of file install/include/rtt/os/oro_allocator.hpp.
typedef Alloc::value_type RTT::os::local_allocator< T, Alloc >::value_type |
Definition at line 50 of file rtt/os/oro_allocator.hpp.
typedef Alloc::value_type RTT::os::local_allocator< T, Alloc >::value_type |
Definition at line 50 of file install/include/rtt/os/oro_allocator.hpp.
RTT::os::local_allocator< T, Alloc >::local_allocator | ( | ) | [inline] |
Definition at line 151 of file install/include/rtt/os/oro_allocator.hpp.
RTT::os::local_allocator< T, Alloc >::local_allocator | ( | const local_allocator< T, Alloc > & | ) | [inline] |
Definition at line 152 of file install/include/rtt/os/oro_allocator.hpp.
RTT::os::local_allocator< T, Alloc >::~local_allocator | ( | ) | [inline] |
Definition at line 153 of file install/include/rtt/os/oro_allocator.hpp.
RTT::os::local_allocator< T, Alloc >::local_allocator | ( | const local_allocator< U, A > & | ) | [inline] |
Definition at line 155 of file install/include/rtt/os/oro_allocator.hpp.
RTT::os::local_allocator< T, Alloc >::local_allocator | ( | ) | [inline] |
Definition at line 151 of file rtt/os/oro_allocator.hpp.
RTT::os::local_allocator< T, Alloc >::local_allocator | ( | const local_allocator< T, Alloc > & | ) | [inline] |
Definition at line 152 of file rtt/os/oro_allocator.hpp.
RTT::os::local_allocator< T, Alloc >::~local_allocator | ( | ) | [inline] |
Definition at line 153 of file rtt/os/oro_allocator.hpp.
RTT::os::local_allocator< T, Alloc >::local_allocator | ( | const local_allocator< U, A > & | ) | [inline] |
Definition at line 155 of file rtt/os/oro_allocator.hpp.
pointer RTT::os::local_allocator< T, Alloc >::_grow | ( | size_type | n, | |
const_pointer | hint = 0 | |||
) | [inline, private] |
Allocate for at least n additional items.
Definition at line 164 of file rtt/os/oro_allocator.hpp.
pointer RTT::os::local_allocator< T, Alloc >::_grow | ( | size_type | n, | |
const_pointer | hint = 0 | |||
) | [inline, private] |
Allocate for at least n additional items.
Definition at line 164 of file install/include/rtt/os/oro_allocator.hpp.
void RTT::os::local_allocator< T, Alloc >::_shrink | ( | pointer | t, | |
size_type | n | |||
) | [inline, private] |
Definition at line 168 of file rtt/os/oro_allocator.hpp.
void RTT::os::local_allocator< T, Alloc >::_shrink | ( | pointer | t, | |
size_type | n | |||
) | [inline, private] |
Definition at line 168 of file install/include/rtt/os/oro_allocator.hpp.
const_pointer RTT::os::local_allocator< T, Alloc >::address | ( | const_reference | x | ) | const [inline] |
Definition at line 63 of file rtt/os/oro_allocator.hpp.
pointer RTT::os::local_allocator< T, Alloc >::address | ( | reference | x | ) | const [inline] |
Definition at line 59 of file rtt/os/oro_allocator.hpp.
const_pointer RTT::os::local_allocator< T, Alloc >::address | ( | const_reference | x | ) | const [inline] |
Definition at line 63 of file install/include/rtt/os/oro_allocator.hpp.
pointer RTT::os::local_allocator< T, Alloc >::address | ( | reference | x | ) | const [inline] |
Definition at line 59 of file install/include/rtt/os/oro_allocator.hpp.
pointer RTT::os::local_allocator< T, Alloc >::allocate | ( | size_type | n, | |
const_pointer | hint = 0 | |||
) | [inline] |
Definition at line 67 of file rtt/os/oro_allocator.hpp.
pointer RTT::os::local_allocator< T, Alloc >::allocate | ( | size_type | n, | |
const_pointer | hint = 0 | |||
) | [inline] |
Definition at line 67 of file install/include/rtt/os/oro_allocator.hpp.
void RTT::os::local_allocator< T, Alloc >::construct | ( | pointer | p, | |
const value_type & | x | |||
) | [inline] |
Definition at line 115 of file rtt/os/oro_allocator.hpp.
void RTT::os::local_allocator< T, Alloc >::construct | ( | pointer | p, | |
const value_type & | x | |||
) | [inline] |
Definition at line 115 of file install/include/rtt/os/oro_allocator.hpp.
void RTT::os::local_allocator< T, Alloc >::deallocate | ( | pointer | p, | |
size_type | n | |||
) | [inline] |
Definition at line 93 of file rtt/os/oro_allocator.hpp.
void RTT::os::local_allocator< T, Alloc >::deallocate | ( | pointer | p, | |
size_type | n | |||
) | [inline] |
Definition at line 93 of file install/include/rtt/os/oro_allocator.hpp.
void RTT::os::local_allocator< T, Alloc >::destroy | ( | pointer | p | ) | [inline] |
Definition at line 119 of file rtt/os/oro_allocator.hpp.
void RTT::os::local_allocator< T, Alloc >::destroy | ( | pointer | p | ) | [inline] |
Definition at line 119 of file install/include/rtt/os/oro_allocator.hpp.
void RTT::os::local_allocator< T, Alloc >::grow | ( | size_type | n, | |
const_pointer | hint = 0 | |||
) | [inline] |
Grow local pool with room for at least n additional items.
Definition at line 124 of file rtt/os/oro_allocator.hpp.
void RTT::os::local_allocator< T, Alloc >::grow | ( | size_type | n, | |
const_pointer | hint = 0 | |||
) | [inline] |
Grow local pool with room for at least n additional items.
Definition at line 124 of file install/include/rtt/os/oro_allocator.hpp.
size_type RTT::os::local_allocator< T, Alloc >::max_size | ( | ) | const [inline] |
Definition at line 111 of file rtt/os/oro_allocator.hpp.
size_type RTT::os::local_allocator< T, Alloc >::max_size | ( | ) | const [inline] |
Definition at line 111 of file install/include/rtt/os/oro_allocator.hpp.
void RTT::os::local_allocator< T, Alloc >::operator= | ( | const local_allocator< T, Alloc > & | ) | [private] |
void RTT::os::local_allocator< T, Alloc >::operator= | ( | const local_allocator< T, Alloc > & | ) | [private] |
void RTT::os::local_allocator< T, Alloc >::shrink | ( | size_type | n | ) | [inline] |
Shrink local pool with n items.
Definition at line 134 of file rtt/os/oro_allocator.hpp.
void RTT::os::local_allocator< T, Alloc >::shrink | ( | size_type | n | ) | [inline] |
Shrink local pool with n items.
Definition at line 134 of file install/include/rtt/os/oro_allocator.hpp.
local_allocator< T, A >::pool_wrapper_type RTT::os::local_allocator< T, A >::pool [inline, static, private] |
Definition at line 188 of file install/include/rtt/os/oro_allocator.hpp.
Mutex RTT::os::local_allocator< T, Alloc >::pool_lock [private] |
Definition at line 160 of file install/include/rtt/os/oro_allocator.hpp.