mmap

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MAdvise

func MAdvise(b []byte, readahead bool) error

MAdvise uses the madvise system call to give advise about the use of memory when using a slice that is memory-mapped to a file. Set the readahead flag to false if page references are expected in random order.

func MMap

func MMap(fd *os.File, writable bool, size int64) ([]byte, error)

MMap uses the mmap system call to memory-map a file. If writable is true, memory protection of the pages is set so that they may be written to as well.

func MSync

func MSync(b []byte) error

MSync would call sync on the mmapped data.

func MUnmap

func MUnmap(b []byte) error

MUnmap unmaps a previously mapped slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL