MMap

package
v0.0.0-...-01e772a Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2021 License: MulanPSL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MMap

type MMap interface {
	// CreateIfNeed 创建映射文件
	// 	当已存在文件大小不一致,将重建新文件
	CreateIfNeed(bytes int64, filename string) (int64, error)
	// Create 创建映射文件
	// -- 任意时刻将强制创建新文件
	Create(bytes int64, filename string) (int64, error)
	// Close 关闭映射文件
	Close() error
	// Set 设置指定偏移值
	Set(offset uint64, f func(Algorithms.ValueType) Algorithms.ValueType) error
}

type MapLinux

type MapLinux struct {
	Address  uintptr //映射起点
	Bytes    uint64  //映射大小
	FileSize uint64  //文件大小
	// contains filtered or unexported fields
}

func (*MapLinux) Close

func (obj *MapLinux) Close() (err error)

func (*MapLinux) Create

func (obj *MapLinux) Create(bytes int64, filename string) (b int64, err error)

func (*MapLinux) CreateIfNeed

func (obj *MapLinux) CreateIfNeed(bytes int64, filename string) (b int64, err error)

func (*MapLinux) Munmap

func (obj *MapLinux) Munmap(data []byte) (err error)

func (*MapLinux) Set

func (obj *MapLinux) Set(offset uint64, f func(Algorithms.ValueType) Algorithms.ValueType) error

Jump to

Keyboard shortcuts

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