我的英语是近似的,对于给您带来的不便,我深表歉意。
我是 c++ 开发人员,我想在我的 boost::interprocess 程序中使用 boost::circular_buffer。
以下代码可以编译,但在启动时冻结:
managed_windows_shared_memory w_shm( boost::interprocess::create_only, "joffrey_app", 100);
typedef char ValueType;
typedef allocator<ValueType, managed_windows_shared_memory::segment_manager> allocator_char;
typedef boost::circular_buffer<ValueType, allocator_char> ipc_circular_buffer;
const allocator_char myallocator (w_shm.get_segment_manager());
ipc_circular_buffer* w_shm_gecko = w_shm.construct<ipc_circular_buffer> ("from_gecko") (myallocator) ;
非常感谢您的回答。