...

Package mmap

import "cmd/go/internal/mmap"
Overview
Index

Overview ▾

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

type Data

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.

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

func Mmap

func Mmap(file string) (Data, error)

Mmap maps the given file into memory.