At first I will outline the domain with 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 don't care about final size of an underlying file, but I cannot foresight this value. Is there any boost mechanism, which will handle resizing an underlying file? Or I have to catch bip::bad_alloc and care about this by my own?