Documentation ¶
Index ¶
- Constants
- type MMap
- func (m *MMap) At(i int) byte
- func (m *MMap) Close() error
- func (m *MMap) Data() []byte
- func (m MMap) Flush() error
- func (m *MMap) Len() int
- func (m MMap) Lock() error
- func (m *MMap) ReadAt(dest []byte, offset int64) (int, error)
- func (m MMap) Unlock() error
- func (m *MMap) WriteAt(src []byte, offset int64) (int, error)
Constants ¶
View Source
const ( // RDONLY maps the memory read-only. // Attempts to write to the MMap object will result in undefined behavior. RDONLY = 0 // RDWR maps the memory as read-write. Writes to the MMap object will update the // underlying file. RDWR = 1 << iota // COPY maps the memory as copy-on-write. Writes to the MMap object will affect // memory, but the underlying file will remain unchanged. COPY // If EXEC is set, the mapped memory is marked as executable. EXEC )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MMap ¶
type MMap struct {
// contains filtered or unexported fields
}
MMap represents a file mapped into memory.
func MapRegion ¶
MapRegion maps part of a file into memory. The offset parameter must be a multiple of the system's page size.
Click to show internal directories.
Click to hide internal directories.