Is there a difference between boost iostream mapped file and boost interprocess mapped file?

后端 未结 2 2098
时光说笑
时光说笑 2021-02-05 20:22

I want to create a mapped binary file into memory; however I am not sure how to create the file to be mapped into the system. I read the documentation several times and realize

2条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-05 20:46

    As far as I can tell, iostreams will place the mapped file in shared memory (this is what you want); however, interprocess however places the file in a another process's address space.

    You should probably use iostreams unless you have multiple processes (not threads) that will be communicating with each other in some way.

提交回复
热议问题