开发者

Boost shared memory. How many processes are currently using the shared memory?

I am sharing some memory between processes, using the boost library;

boost::interprocess::managed_shared_memory managed_shm(boost::interprocess::open_or_create, "shm", 1024);

is there a way to find out h开发者_开发问答ow many processes are currently accessing this memory?


If you can get the underlying SHM ID, you can use shmctl function to get the number of processes having the segment attached.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜