common

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Alloc

func Alloc(size uint32) uint32

func BytesToPointer

func BytesToPointer(v []byte) (addr, size uint32)

func FreeResource

func FreeResource(rid uint32) bool

func GetDB

func GetDB(key string) int32

func GetDataByRID

func GetDataByRID(rid uint32) ([]byte, error)

func Log

func Log(message string)

func PointerToBytes

func PointerToBytes(ptr uint32, size uint32) []byte

func PointerToString

func PointerToString(ptr uint32, size uint32) string

PointerToString ptr

func SendTx

func SendTx(key string) int32

func SetDB

func SetDB(key string, v int32)

func StringToPointer

func StringToPointer(v string) (addr, size uint32)

Types

type Mem

type Mem struct {
	Addr uint32
	Size uint32
	// contains filtered or unexported fields
}

func NewMemory

func NewMemory(size uint32) *Mem

type MemMgr

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

func (*MemMgr) AddAllocation

func (mm *MemMgr) AddAllocation(size uint32) *Mem

func (*MemMgr) AddResource

func (mm *MemMgr) AddResource(rid, size uint32) *Mem

func (*MemMgr) AddResourceWithMem

func (mm *MemMgr) AddResourceWithMem(rid uint32, m *Mem)

func (*MemMgr) FreeResource

func (mm *MemMgr) FreeResource(rid uint32) bool

func (*MemMgr) GetByAddr

func (mm *MemMgr) GetByAddr(ptr uint32) *Mem

func (*MemMgr) GetByRID

func (mm *MemMgr) GetByRID(rid uint32) *Mem

Jump to

Keyboard shortcuts

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