First I will describe the domain with the source.
namespace bip=boost::interprocess;
typedef bip::allocator<int, bip::managed_mapped_file::segment_manager> allocator;
typedef bip::vector<int, allocator> vector;
bip::managed_mapped_file m_file(open_or_create, "./file", constant_value);
bip::allocator alloc(m_file.get_segment_manager());
bip::vector *vec = m_file.find_or_construct<vector>("vector")(alloc);
I do not need the final size of the base file, but I cannot foresee this value. Is there a boost mechanism that will handle resizing the base file? Or do I need to catch bip :: bad_alloc and take care of this myself?
source
share