shm

package
v0.0.0-...-721426e Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Memory

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

Memory 基于操作系统共享内存实现

func NewMemory

func NewMemory(key string, bytes uint64, createIfNotExists bool) *Memory

func (*Memory) Attach

func (m *Memory) Attach() error

func (*Memory) Detach

func (m *Memory) Detach() (err error)

func (*Memory) Handle

func (m *Memory) Handle() uint64

func (*Memory) Key

func (m *Memory) Key() string

func (*Memory) Ptr

func (m *Memory) Ptr() unsafe.Pointer

func (*Memory) PtrOffset

func (m *Memory) PtrOffset(offset uint64) unsafe.Pointer

func (*Memory) Size

func (m *Memory) Size() uint64

func (*Memory) Travel

func (m *Memory) Travel(skipOffset uint64, fn func(ptr unsafe.Pointer, size uint64) uint64)

Jump to

Keyboard shortcuts

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