简体   繁体   中英

Can boost do shared memory between processes that are on different CPUs

If i have a multiprocessor with 2 CPUs, and i have a process running on CPU 1, and another process on CPU 2, is boost::interprocess shared memory be used between them? If so, how is that implemented? I couldn't find any documentation in the boost docs about it

It is not advantage of boost, but platform. Boost uses shmem or memory mapped files support in the level of operating system.

Yes, if you're on either an SMP or standard NUMA system.

Maybe not if some of your CPUs are running on daughter boards or similar.


The OS and underlying hardware platform (which you haven't told us) control this, and you should be able to ask a question specific to that OS/platform in an appropriate forum if you're still not sure.

If you're not sure which of the above two cases are relevant, it's almost certain you're on a general-purpose platform and it will all work. Note that Boost may not expose NUMA affinity control however, if you want to choose which node pages are allocated on.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM