memory_map

package
v0.0.0-...-0b345dd Latest Latest
Warning

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

Go to latest
Published: May 6, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadMemoryMapMaxSizeMb

func ReadMemoryMapMaxSizeMb(memoryMapMaxSizeMbString string) (uint32, error)

Types

type MemoryBuffer

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

type MemoryMap

type MemoryMap struct {
	File *os.File

	End_of_file int64
	// contains filtered or unexported fields
}

func (*MemoryMap) CreateMemoryMap

func (mMap *MemoryMap) CreateMemoryMap(file *os.File, maxLength uint64)

func (*MemoryMap) DeleteFileAndMemoryMap

func (mBuffer *MemoryMap) DeleteFileAndMemoryMap()

func (*MemoryMap) ReadMemory

func (mMap *MemoryMap) ReadMemory(offset uint64, length uint64) ([]byte, error)

func (*MemoryMap) WriteMemory

func (mMap *MemoryMap) WriteMemory(offset uint64, length uint64, data []byte)

type MemoryMappedFile

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

func NewMemoryMappedFile

func NewMemoryMappedFile(f *os.File, memoryMapSizeMB uint32) *MemoryMappedFile

func (*MemoryMappedFile) Close

func (mmf *MemoryMappedFile) Close() error

func (*MemoryMappedFile) GetStat

func (mmf *MemoryMappedFile) GetStat() (datSize int64, modTime time.Time, err error)

func (*MemoryMappedFile) Name

func (mmf *MemoryMappedFile) Name() string

func (*MemoryMappedFile) ReadAt

func (mmf *MemoryMappedFile) ReadAt(p []byte, off int64) (n int, err error)

func (*MemoryMappedFile) Sync

func (mm *MemoryMappedFile) Sync() error

func (*MemoryMappedFile) Truncate

func (mmf *MemoryMappedFile) Truncate(off int64) error

func (*MemoryMappedFile) WriteAt

func (mmf *MemoryMappedFile) WriteAt(p []byte, off int64) (n int, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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