...

Package mmap

import "cmd/vendor/golang.org/x/telemetry/internal/mmap"
Overview
Index

Overview ▾

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

func Munmap

func Munmap(d *Data) error

Munmap unmaps the given file from memory.

type Data

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

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

func Mmap

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

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