mmap

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Map

func Map(
	prot int,
	flags int,
	length int64,
	f *os.File,
) (
	[]byte,
	error,
)

Map creates a memory map of the given file.

func Remap

func Remap(
	f *os.File,
	data []byte,
	newSize int64,
) ([]byte, error)

Remap truncates the file to `newSize` and returns a new memory map for the file.

func Sync added in v1.3.0

func Sync(data []byte) error

Sync writes the mmapped data to disk before returning.

func Unmap

func Unmap(data []byte) error

Unmap unmaps the data obtained by Map.

Types

This section is empty.

Jump to

Keyboard shortcuts

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