ACE shared memory mmap memory pool

来源:互联网 发布:数据平台建设方案 编辑:程序博客网 时间:2024/05/05 20:21

It took me several hours' editing and debugging when i  want to implement info share between different processes in single machine(single write multi read) with ACE.

 

Two principles got from debugging:

bind() must be called by writer

when shared info read and written by different process, position-independent allocation must used

 

All those unnecessary work can be avoided by reading "ACE programmer's guide" 17.2/17.3 carefully