V2EX  ›  英汉词典

MMAP

Definition|定义

mmap 是类 Unix 系统中的一个系统调用/接口,用于把文件或设备映射到进程的虚拟内存地址空间(“内存映射”)。这样程序就能像访问内存一样读写文件内容,常用于高效 I/O、共享内存、加载大型文件等。(也可指 memory-mapped file 的用法/机制。)

Pronunciation|发音

/ɛmɛmˈæp/

Examples|例句

The program uses mmap to read the file quickly.
这个程序使用 mmap 来快速读取文件。

By using mmap, the database can share pages between processes and reduce copying overhead.
通过使用 mmap,数据库可以在进程之间共享内存页并减少拷贝开销。

Etymology|词源

mmap 通常被理解为 memory map(内存映射)的缩写:m(memory)+ map(映射)。它在早期 Unix/POSIX 风格的系统接口中作为把文件映射进内存的核心机制而普及,并在许多操作系统与编程文献中沿用至今。

Related Words|相关词

Literary Works|文学与著作中的用例

  • The Linux Programming Interface(Michael Kerrisk)——详细讲解 mmap() 与内存映射文件的实践与陷阱
  • *Advanced Programming in the UNIX Environment (APUE)*(W. Richard Stevens, Stephen A. Rago)——介绍 mmap 在 Unix 编程中的典型用法
  • UNIX Systems for Modern Architectures(Curt Schimmel)——涉及虚拟内存与映射机制,包含对 mmap 概念的讨论
  • Linux man 2 mmap 手册页——权威接口说明与参数/返回值定义
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   1818 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 13ms · UTC 07:38 · PVG 15:38 · LAX 23:38 · JFK 02:38
♥ Do have faith in what you're doing.