简体   繁体   中英

memory mapping in linux kernel

in linux kernel, is it possible for the same physical page frame to be mapped more than once at the same time to the virtual memory space of one process?

In other words, there are multiple page table entries in this process that point to the same physical page.

Yes. In particular a zeroed page is mapped with copy-on-write semantics everywhere zero initialized memory is allocated, like the .bss section of executables.

Whether that can be done for writable mappings without problems might depend on the CPU architecture (in particular the cache design). I can't say right now whether Linux allows that.

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