![]() |
Home | Libraries | People | FAQ | More |
boost::interprocess::basic_managed_external_buffer
// In header: <boost/interprocess/managed_external_buffer.hpp> template<typename CharType, typename AllocationAlgorithm, template< class IndexConfig > class IndexType> class basic_managed_external_buffer { public: // types typedef base_t::size_type size_type; // public member functions basic_managed_external_buffer() noexcept; basic_managed_external_buffer(open_only_t, void *, size_type); basic_managed_external_buffer(basic_managed_external_buffer &&) noexcept; basic_managed_external_buffer & operator=(basic_managed_external_buffer &&) noexcept; void grow(size_type); void swap(basic_managed_external_buffer &) noexcept; };
A basic user memory named object creation class. Inherits all basic functionality from basic_managed_memory_impl<CharType, AllocationAlgorithm, IndexType>*<zwj></zwj>/
basic_managed_external_buffer
public member functionsbasic_managed_external_buffer() noexcept;
Default constructor. Does nothing. Useful in combination with move semantics
basic_managed_external_buffer(open_only_t, void * addr, size_type size);
Creates and places the segment manager. This can throw The external memory supplied by the user shall be aligned to the maximum value between alignof(std::max_align_t)
and the strictest alignment of any over-aligned type to be built !inside that memory. basic_managed_external_buffer (create_only_t, void *addr, size_type size) { Check if alignment is correct BOOST_ASSERT((0 == (((std::size_t)addr) & (AllocationAlgorithm::Alignment - size_type(1u))))); if(!base_t::create_impl(addr, size)){ throw interprocess_exception("Could not initialize buffer in basic_managed_external_buffer constructor"); } }
!Creates and places the segment manager. This can throw !The external memory supplied by the user shall be aligned to the maximum value between !alignof(std::max_align_t)
and the strictest alignment of any over-aligned type to be built inside that memory.
basic_managed_external_buffer(basic_managed_external_buffer && moved) noexcept;Moves the ownership of "moved"'s managed memory to *this. Does not throw.
basic_managed_external_buffer & operator=(basic_managed_external_buffer && moved) noexcept;Moves the ownership of "moved"'s managed memory to *this. Does not throw.
void grow(size_type extra_bytes);
Tries to resize internal heap memory so that we have room for more objects.
void swap(basic_managed_external_buffer & other) noexcept;
Swaps the ownership of the managed heap memories managed by *this and other. Never throws.