Discover Packages
Standard library
cmd
go
internal
mmap
package
standard library
Version:
master (49cdf0c)
Opens a new window with list of versions in this module.
Published: Jun 20, 2025
License: BSD-3-Clause
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Rendered for
linux/amd64
windows/amd64
darwin/amd64
js/wasm
The mmap package provides an abstraction for memory mapping files
on different platforms.
type Data struct {
Data []byte
}
Data is mmap'ed read-only data from a file.
The backing file is never closed, so Data
remains valid for the lifetime of the process.
Mmap maps the given file into memory.
The boolean result indicates whether the file was opened.
If it is true, the caller should avoid attempting
to write to the file on Windows, because Windows locks
the open file, and writes to it will fail.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.