package mmap

import "cuelang.org/go/internal/golangorgx/telemetry/internal/mmap"

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

Index

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.

Source Files

mmap.go mmap_unix.go

Version
v0.10.0
Published
Aug 15, 2024
Platform
linux/amd64
Imports
4 packages
Last checked
15 minutes ago

Tools for package owners.