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.
精彩评论