libjmmcg
build_2783
A C++ library containing an eclectic mix of useful, advanced components.
|
A very simple custom allocator that allocates a contiguous block of uninitialised items on the heap. More...
#include <memory_buffer.hpp>
Public Types | |
enum | { stride =sizeof(element_type) } |
typedef OST | os_traits |
typedef os_traits::exception_type | exception_type |
typedef El | element_type |
The type of items to allocate, but not initialise. More... | |
typedef buff_info_t::second_type | size_type |
typedef unsigned const char * | const_iterator |
typedef unsigned char * | iterator |
Public Member Functions | |
BOOST_MPL_ASSERT ((boost::mpl::greater< boost::mpl::int_< stride >, boost::mpl::int_< 0 >>)) | |
memory_buffer (size_type const num_objs) noexcept(false) FORCE_INLINE | |
~memory_buffer () noexcept(true) FORCE_INLINE | |
memory_buffer (memory_buffer const &)=delete | |
memory_buffer (memory_buffer &&)=delete | |
void | operator= (memory_buffer const &)=delete |
void | operator= (memory_buffer &&)=delete |
const_iterator | data () const noexcept(true) FORCE_INLINE |
iterator | data () noexcept(true) FORCE_INLINE |
size_type __fastcall | max_size () const noexcept(true) FORCE_INLINE |
Friends | |
tostream &__fastcall | operator<< (tostream &os, memory_buffer const &t) noexcept(false) |
A very simple custom allocator that allocates a contiguous block of uninitialised items on the heap.
Note that the items allocated are guaranteed not to be initialised.
Definition at line 76 of file memory_buffer.hpp.
typedef unsigned const char* jmmcg::heap::memory_buffer< OST, El >::const_iterator |
Definition at line 104 of file memory_buffer.hpp.
typedef El jmmcg::heap::memory_buffer< OST, El >::element_type |
The type of items to allocate, but not initialise.
Definition at line 97 of file memory_buffer.hpp.
typedef os_traits::exception_type jmmcg::heap::memory_buffer< OST, El >::exception_type |
Definition at line 96 of file memory_buffer.hpp.
typedef unsigned char* jmmcg::heap::memory_buffer< OST, El >::iterator |
Definition at line 105 of file memory_buffer.hpp.
typedef OST jmmcg::heap::memory_buffer< OST, El >::os_traits |
Definition at line 95 of file memory_buffer.hpp.
typedef buff_info_t::second_type jmmcg::heap::memory_buffer< OST, El >::size_type |
Definition at line 103 of file memory_buffer.hpp.
anonymous enum |
Enumerator | |
---|---|
stride | The sizeof(element_type) each item, specifically in bytes. |
Definition at line 107 of file memory_buffer.hpp.
|
inlineexplicitnoexcept |
num_objs | The number of the items to be allocated. |
Definition at line 116 of file memory_buffer.hpp.
|
inlinenoexcept |
Definition at line 129 of file memory_buffer.hpp.
|
delete |
|
delete |
jmmcg::heap::memory_buffer< OST, El >::BOOST_MPL_ASSERT | ( | (boost::mpl::greater< boost::mpl::int_< stride >, boost::mpl::int_< 0 >>) | ) |
|
inlinenoexcept |
Definition at line 141 of file memory_buffer.hpp.
|
inlinenoexcept |
Definition at line 147 of file memory_buffer.hpp.
|
inlinenoexcept |
Definition at line 154 of file memory_buffer.hpp.
|
delete |
|
delete |
|
friend |
Definition at line 162 of file memory_buffer.hpp.