memory

package
v0.0.0-...-c8e9c26 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2018 License: LGPL-3.0, BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PType

type PType int
const (
	PInt8 PType = iota
	PInt16
	PInt32
	PInt64
	PFloat32
	PFloat64
	PString
	PStruct
	PUnkown
)

type TypeLength

type TypeLength struct {
	Ptype  PType
	Length int
}

type VMmemory

type VMmemory struct {
	Memory          []byte
	AllocedMemIdex  int
	PointedMemIndex int
	ParamIndex      int //args analyze pointer
	MemPoints       map[uint64]*TypeLength
}

func (*VMmemory) GetPointerMemSize

func (vm *VMmemory) GetPointerMemSize(addr uint64) int

func (*VMmemory) GetPointerMemory

func (vm *VMmemory) GetPointerMemory(addr uint64) ([]byte, error)

when wasm returns a pointer, call this function to get the pointed memory

func (*VMmemory) Malloc

func (vm *VMmemory) Malloc(size int) (int, error)

func (*VMmemory) MallocPointer

func (vm *VMmemory) MallocPointer(size int, p_type PType) (int, error)

func (*VMmemory) SetMemory

func (vm *VMmemory) SetMemory(val interface{}) (int, error)

func (*VMmemory) SetPointerMemory

func (vm *VMmemory) SetPointerMemory(val interface{}) (int, error)

func (*VMmemory) SetStructMemory

func (vm *VMmemory) SetStructMemory(val interface{}) (int, error)

Jump to

Keyboard shortcuts

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