stmmap

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2024 License: MIT Imports: 3 Imported by: 0

README

a simple mmap file lib. example

//f, e := os.OpenFile(fpath, os.O_RDWR, 0644)
f, e := stmmap.CreateFile(fpath, 65536*2)
stmmap.NewMmap(f, 65536, 65536)

Documentation

Overview

mmap.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateFile

func CreateFile(name string, length int64) (*os.File, error)

Types

type Mmap

type Mmap interface {
	Data() []byte
	Size() uint32
	Flush() error
	Lock() error
	Unlock() error
	Unmap() error
}

func NewMmap

func NewMmap(f *os.File, offset int64, length int) (Mmap, error)

Jump to

Keyboard shortcuts

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