mmap

package module
v0.0.0-...-3106899 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2021 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RDONLY = 0
	RDWR   = 1 << iota
	COPY
	EXEC
)
View Source
const (
	ANON = 1 << iota
)

Variables

This section is empty.

Functions

func OpenFile

func OpenFile(path string) (*os.File, error)

Types

type MMap

type MMap []byte

func Map

func Map(f *os.File, prot, flags int) (MMap, error)

func MapRegion

func MapRegion(f *os.File, length int, prot, flags int, offset int64) (MMap, error)

func (MMap) Flush

func (m MMap) Flush() error

func (MMap) Lock

func (m MMap) Lock() error

func (MMap) Unlock

func (m MMap) Unlock() error

func (*MMap) Unmap

func (m *MMap) Unmap() error

type MappedFile

type MappedFile struct {
	// contains filtered or unexported fields
}

func OpenMappedFile

func OpenMappedFile(path string, prot, flags int) (*MappedFile, error)

func (*MappedFile) Close

func (mf *MappedFile) Close() error

func (*MappedFile) Len

func (mf *MappedFile) Len() int

func (*MappedFile) Read

func (mf *MappedFile) Read(b []byte) (int, error)

func (*MappedFile) ReadAt

func (mf *MappedFile) ReadAt(b []byte, off int64) (int, error)

func (*MappedFile) Seek

func (mf *MappedFile) Seek(offset int64, whence int) (int64, error)

func (*MappedFile) Write

func (mf *MappedFile) Write(b []byte) (int, error)

func (*MappedFile) WriteAt

func (mf *MappedFile) WriteAt(b []byte, off int64) (int, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL