好好爱自己!

【转】File-Backed and Page-File-Backed Sections

原文:https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/file-backed-and-page-file-backed-sections

-------------------------------------------

File-Backed and Page-File-Backed Sections

All memory sections are supported ("backed") by disk files that can contain, either temporarily or permanently, the data to be shared.

When you create a section, you can identify a specific data file to which the section will be backed. Such sections are called file-backed sections.

If you do not identify a backing file, the section is backed by the system's paging file and the section is called a page-file-backed section. The data in file-backed sections can be permanently written to disk. Data in page-file-backed sections is never permanently written to disk.

file-backed section reflects the contents of an actual file on disk; in other words, it is a memory-mapped file. Any access to memory locations within a given file-backed section corresponds to accesses to locations in the associated file.

If a process maps the view as read-only, any data that is read from the view is transparently read from the file. Similarly, if the process maps the view as read/write, any data that is read from the view or written to the view is transparently read from or written to the file. In either case, the view's virtual memory does not use any space in the page files.

A file-backed section can also be mapped as copy-on-write. In that case, the view's data is read from the file, but any data written to the view is not written to the file; instead it is discarded after the final view is unmapped and the last handle to the section is closed.

A page-file-backed section is backed by the page files instead of by any explicit file on the disk. Any changes that are made to a page-file-backed section are automatically discarded after the section object is destroyed. Page-file-backed sections can be used as shared memory segments between two processes.

Any section, file-backed or not, can be shared between two processes. The same physical memory address range is mapped to a virtual memory address range within each process (though not necessarily to the same virtual address).

posted @   立志做一个好的程序员  阅读(244)  评论(0编辑  收藏  举报
编辑推荐:
· AI与.NET技术实操系列:基于图像分类模型对图像进行分类
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
阅读排行:
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· 25岁的心里话
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 按钮权限的设计及实现
历史上的今天:
2018-09-08 用php当作cat使用
2017-09-08 jquery 的ajax无刷新上传文件之后,页面还是会莫名的刷新-----解决办法
2016-09-08 angularJS 系列(一)

不断学习创作,与自己快乐相处

点击右上角即可分享
微信分享提示