mmap

package
v0.0.0-...-8eacd36 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

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.

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 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