View source code
Display the source code in std/mmfile.d from which this
page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a
Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
local clone.
Module std.mmfile
Read and write memory mapped files.
Memory mapped files are a mechanism in operating systems that allows
file access through virtual memory. After opening a file with MmFile
,
the contents can be read from or written to with standard slice / pointer operations.
Changes to the memory are automatically reflected in the underlying file.
Memory mapping can increase I/O performance of large files, compared to buffered
read / write operations from std
and std
. However, I/O errors are
not handled as safely: when for example the disk that the file is on gets removed,
reading from it may result in a segfault.
References
Classes
Name | Description |
---|---|
MmFile
|
MmFile objects control the memory mapped file resource. |
Authors
Walter Bright, Matthew Wilson
License
Copyright © 1999-2024 by the D Language Foundation | Page generated by ddox.