【发布时间】:2014-02-14 04:08:36
【问题描述】:
在this 线程中,建议OP 使用mmap() 而不是shmget() 在Linux 中获取共享内存。
我访问了this 页面和this 页面以获取一些文档,但第二个给出了一个关于mmap() 的模糊示例。
几乎是新手,需要在两个进程之间共享一些信息(以文本形式),我应该使用shmget() 方法还是mmap()?为什么?
【问题讨论】:
标签: c linux posix shared-memory mmap