A basic heap memory named object creation class. More...
#include <managed_heap_memory.hpp>
Public Types | |
typedef base_t::size_type | size_type |
Public Member Functions | |
basic_managed_heap_memory () | |
Default constructor. More... | |
~basic_managed_heap_memory () | |
Destructor. More... | |
basic_managed_heap_memory (size_type size) | |
Creates heap memory and initializes the segment manager. More... | |
basic_managed_heap_memory (BOOST_RV_REF(basic_managed_heap_memory) moved) | |
Moves the ownership of "moved"'s managed memory to *this. Does not throw. More... | |
basic_managed_heap_memory & | operator= (BOOST_RV_REF(basic_managed_heap_memory) moved) |
Moves the ownership of "moved"'s managed memory to *this. Does not throw. More... | |
bool | grow (size_type extra_bytes) |
Tries to resize internal heap memory so that we have room for more objects. More... | |
void | swap (basic_managed_heap_memory &other) |
Swaps the ownership of the managed heap memories managed by *this and other. More... | |
A basic heap memory named object creation class.
Initializes the heap memory segment. Inherits all basic functionality from basic_managed_memory_impl<CharType, AllocationAlgorithm, IndexType>
typedef base_t::size_type boost::interprocess::basic_managed_heap_memory< CharType, AllocationAlgorithm, IndexType >::size_type |
|
inline |
Default constructor.
Does nothing. Useful in combination with move semantics
|
inline |
Destructor.
Liberates the heap memory holding the managed data. Never throws.
|
inline |
Creates heap memory and initializes the segment manager.
This can throw.
|
inline |
Moves the ownership of "moved"'s managed memory to *this. Does not throw.
References boost::interprocess::basic_managed_heap_memory< CharType, AllocationAlgorithm, IndexType >::swap().
|
inline |
Tries to resize internal heap memory so that we have room for more objects.
WARNING: If memory is reallocated, all the objects will be binary-copied to the new buffer. To be able to use this function, all pointers constructed in this buffer must be offset pointers. Otherwise, the result is undefined. Returns true if the growth has been successful, so you will have some extra bytes to allocate new objects. If returns false, the heap allocation has failed.
References BOOST_CATCH, BOOST_CATCH_END, and BOOST_TRY.
|
inline |
Moves the ownership of "moved"'s managed memory to *this. Does not throw.
References boost::move(), and boost::interprocess::basic_managed_heap_memory< CharType, AllocationAlgorithm, IndexType >::swap().
|
inline |
Swaps the ownership of the managed heap memories managed by *this and other.
Never throws.
References boost::swap.
Referenced by boost::interprocess::basic_managed_heap_memory< CharType, AllocationAlgorithm, IndexType >::basic_managed_heap_memory(), and boost::interprocess::basic_managed_heap_memory< CharType, AllocationAlgorithm, IndexType >::operator=().