boost::interprocess 和circular_buffer ,C++
我的英语水平很差,对于给您带来的不便,我深表歉意。
我是 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) ;
提前非常感谢您的回答。
My English is approximate, I apologize for this inconvenience.
I am c++ developer and I would like to use boost::circular_buffer in my boost::interprocess program.
This following code compiles but there is a freeze at startup :
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) ;
Thank you very much in advance for your answer.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论