mmap

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2025 License: GPL-3.0, BSD-3-Clause Imports: 4 Imported by: 0

README

mmap

Extracted from go/src/cmd/go/internal/mmap/ (related to cache). This is just a copy of the Go code without any changes.

History

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

This section is empty.

Types

type Data

type Data struct {
	Data []byte
	// contains filtered or unexported fields
}

Data is mmap'ed read-only data from a file. The backing file is never closed, so Data remains valid for the lifetime of the process.

func Mmap

func Mmap(file string) (Data, bool, error)

Mmap maps the given file into memory.

Jump to

Keyboard shortcuts

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