Documentation
¶
Index ¶
Constants ¶
View Source
const ( WasmPageSize = 1 << 16 // 64Kb MaxPages = 4 * 1024 * 1024 * 1024 / WasmPageSize Alignment = 8 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BumpAllocator ¶
type BumpAllocator struct {
// contains filtered or unexported fields
}
func New ¶
func New(heapBase uint32, info MemInfo) *BumpAllocator
func (*BumpAllocator) Alloc ¶
func (b *BumpAllocator) Alloc(mem Memory, size uint32) (ptr uint32, err error)
func (*BumpAllocator) HeapBase ¶
func (b *BumpAllocator) HeapBase() uint32
type MemDefinition ¶
type MemDefinition struct {
// contains filtered or unexported fields
}
func (MemDefinition) Max ¶
func (i MemDefinition) Max() (uint32, bool)
type MemoryMockup ¶
type MemoryMockup struct {
// contains filtered or unexported fields
}
func NewMemoryMock ¶
func NewMemoryMock(t *testing.T, pages uint32) *MemoryMockup
func NewMemoryMockWithLimit ¶
func NewMemoryMockWithLimit(t *testing.T, pages, pageLimit uint32) *MemoryMockup
func (*MemoryMockup) Definition ¶
func (m *MemoryMockup) Definition() *MemDefinition
func (*MemoryMockup) Size ¶
func (m *MemoryMockup) Size() uint32
Click to show internal directories.
Click to hide internal directories.