Documentation
¶
Overview ¶
Package mmap provides a simplified interface to using mmap on linux/unix systems.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mmap ¶
type Mmap struct { // The underlying file handle. It will be cleaned up with Close(). File *os.File // The byte array of the mmaped file. Buf []byte }
Mmap represents a single mapped file. It uses mmap to store the data. Sync() and Close() should be used to ensure data integrity. Since the actual byte array is available, no locking is done at this level.
func New ¶
New maps a new file. If size > 0, then the file is increased to the given size if it is not already at least that size. The flags and perms are passed when opening the file and determine how the mmap will be opened. If private it true, then the map will be private.
Click to show internal directories.
Click to hide internal directories.