【发布时间】:2013-10-10 17:09:28
【问题描述】:
嗯。我对virtual address spaces 中使用的memory mapped file 的概念感到非常困惑。
我在以下链接中搜索过。
http://en.wikipedia.org/wiki/Virtual_address_space
我找到了一个部分
Then the application's executable file is mapped into the Virtual Address Space.
Addresses in the process VAS are mapped to bytes in the exe file.
The OS manages the mapping:
0 4GB
VAS |---vvvvvvv------------------------------------|
mapping |-----|
file bytes app.exe
The v's are values from bytes in the mapped file.
现在这个内存映射文件与特定虚拟地址空间中的特定进程有什么关系(在上一节的最后一条语句中混淆了)?
为什么明确需要包含用于创建与特定进程对应的内存映射文件的代码?
【问题讨论】:
-
它描述了您运行的可执行文件的代码如何使用内存映射加载到内存中。
标签: c++ operating-system memory-mapped-files virtual-address-space