我使用Boost Interprocess来映射共享内存中的向量。以下是我从Boost教程获得的代码:using ShmemAllocator = allocator<int, managed_shared_memoryquestion refers to this sizemanaged_shared_memor
//This allocator will allow placing containers in the segmenttypedef allocator<vector<int , ShmemAllocator>, managed_shared_memoryremove("MySharedMemory"); }
} re