mmap

package
v0.12.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0, BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

The mmap package provides an abstraction for memory mapping files on different platforms.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Munmap

func Munmap(d *Data) error

Munmap unmaps the given file from memory.

Types

type Data

type Data struct {
	Data []byte
	// Some windows magic
	Windows interface{}
	// contains filtered or unexported fields
}

The backing file is never closed, so Data remains valid for the lifetime of the process.

func Mmap

func Mmap(f *os.File, data *Data) (Data, error)

Mmap maps the given file into memory. When remapping a file, pass the most recently returned Data.

Jump to

Keyboard shortcuts

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