mmap

Imports

Imports #

"io"
"os"
"fmt"
"io/fs"
"os"
"syscall"
"fmt"
"os"
"syscall"
"unsafe"
"internal/syscall/windows"
"os"

Structs

Data struct #

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 {
f *os.File
Data []byte
}

Functions

Mmap function #

Mmap maps the given file into memory.

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

mmapFile function #

mmapFile on other systems doesn't mmap the file. It just reads everything.

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

mmapFile function #

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

mmapFile function #

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

Generated with Arrow