c++ - <SOLVED>Boost Shared Memory : the volume of a file has been externally altered and open file is not longer valid -


i'm using boost shared memory share vectors across different processes. however, on occasions, consumer of shared memory throws exception :

unexpected exception: volume file has been externally altered opened file no longer valid.

i have proper synchronization mechanism set in place. error indicate?

solved size of memory hadn't been allocated upon creation 1 of processes.

when shared memory object created, size 0. set size of shared memory, user must use truncate function call, in shared memory has been opened read-write attributes

source - boost shared memory

kindly advise.

thank you.

it means volume file has been externally altered. other processes writing file.

in other words, means not have proper synchronization in place.

do use bip::managed_mapped_file::grow change? documentation states allows offline growing.


Comments