Documentation
¶
Overview ¶
Package mmap provides a way to memory-map a file.
Index ¶
- Constants
- func Fd(f *os.File) int
- func Fsize(f *os.File) int
- func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error)
- func Msync(b []byte) (err error)
- func Munmap(b []byte) (err error)
- func Offset(offset int64) int64
- func Open(fd int, offset int64, length int, p Prot) (data []byte, err error)
- func ProtFlags(p Prot) (prot int, flags int)
- type Prot
Constants ¶
View Source
const ( PROT_READ = syscall.PROT_READ PROT_WRITE = syscall.PROT_WRITE PROT_EXEC = syscall.PROT_EXEC MAP_SHARED = syscall.MAP_SHARED MAP_PRIVATE = syscall.MAP_PRIVATE MAP_COPY = MAP_PRIVATE )
Variables ¶
This section is empty.
Functions ¶
func Fd ¶
Fd returns the integer file descriptor referencing the open file. The file descriptor is valid only until f.Close is called or f is garbage collected.
Types ¶
Click to show internal directories.
Click to hide internal directories.