Documentation ¶
Index ¶
- Constants
- type PType
- type TypeLength
- type VMmemory
- func (vm *VMmemory) GetPointerMemSize(addr uint64) int
- func (vm *VMmemory) GetPointerMemory(addr uint64) ([]byte, error)
- func (vm *VMmemory) Malloc(size int) (int, error)
- func (vm *VMmemory) MallocPointer(size int, p_type PType) (int, error)
- func (vm *VMmemory) SetMemory(val interface{}) (int, error)
- func (vm *VMmemory) SetPointerMemory(val interface{}) (int, error)
- func (vm *VMmemory) SetStructMemory(val interface{}) (int, error)
Constants ¶
View Source
const (
//VM_NIL_POINTER = math.MaxInt64
VM_NIL_POINTER = 0
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TypeLength ¶
type VMmemory ¶
type VMmemory struct { Memory []byte AllocedMemIdex int PointedMemIndex int ParamIndex int //args analyze pointer MemPoints map[uint64]*TypeLength }
func (*VMmemory) GetPointerMemSize ¶
return pointed memory size
func (*VMmemory) GetPointerMemory ¶
return pointed memory when wasm returns a pointer, call this function to get the pointed memory
func (*VMmemory) MallocPointer ¶
Alloc memory for pointer types, return the address in memory
func (*VMmemory) SetPointerMemory ¶
set pointer types into memory, return address of memory
func (*VMmemory) SetStructMemory ¶
set struct into memory , return address of memory
Click to show internal directories.
Click to hide internal directories.