mmap

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2025 License: Apache-2.0 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)

func Mremap

func Mremap(data []byte, size int) ([]byte, error)

Mremap unmmap and mmap

func Msync

func Msync(b []byte) error

Msync would call sync on the mmapped data.

func Unmap

func Unmap(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