Open qiuwei opened 7 months ago
The problem in this example is that the type is overaligned, which is not supported by Boost.Interprocess allocators. In Debug mode, an assertion triggers when trying to make sure that the memory is aligned for the type being allocated. Maybe it should be a compilation error, as boost::interprocess allocators know the alignment of the type and the alignment that the segment manager can guarantee.
I am trying to construct a bip::vector of POD using boost interprocess managed shared memory. The following code compiles and run in release mode, but crashes in debug mode.
The error when running in debug mode:
how could I fix the issue?