Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Mmap
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Memory map - POSIX-compliant system call}} {{lowercase|title=mmap}} {{Distinguish|nmap}} In [[computing]], '''<code>mmap(2)</code>''' is a [[POSIX]]-compliant [[Unix]] [[system call]] that maps files or devices into memory. It is a method of [[memory-mapped file]] I/O. It implements [[demand paging]] because file contents are not immediately read from disk and initially use no physical RAM at all. The actual reads from disk are performed after a specific location is accessed, in a [[lazy evaluation|lazy]] manner. After the mapping is no longer needed, the pointers must be unmapped with <code>munmap(2)</code>. [[Memory protection|Protection]] information—for example, marking mapped regions as executable—can be managed using <code>mprotect(2)</code>, and special treatment can be enforced using <code>madvise(2)</code>. In [[Linux]], [[macOS]] and the [[BSD]]s, <code>mmap</code> can create several types of mappings. Other operating systems may only support a subset of these; for example, shared mappings may not be practical in an operating system without a global [[Virtual file system|VFS]] or I/O cache.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)