package mmap

import "cmd/go/internal/mmap"

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

Index

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.

Source Files

mmap.go mmap_unix.go

Version
v1.24.0 (latest)
Published
Feb 10, 2025
Platform
linux/amd64
Imports
4 packages
Last checked
25 minutes ago

Tools for package owners.