mheap

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Alloc

func Alloc(m *Mheap, size int64) ([]byte, error)

func Free

func Free(m *Mheap, data []byte)

func Grow

func Grow(m *Mheap, old []byte, size int64) ([]byte, error)

func HostSize

func HostSize(m *Mheap) int64

func Size

func Size(m *Mheap) int64

Types

type Mheap

type Mheap struct {
	Gm *guest.Mmu
	Mp *mempool.Mempool
}

func New

func New(gm *guest.Mmu) *Mheap

func (*Mheap) Alloc added in v0.5.1

func (m *Mheap) Alloc(size int64) ([]byte, error)

func (*Mheap) Free added in v0.5.1

func (m *Mheap) Free(data []byte)

func (*Mheap) Grow added in v0.5.1

func (m *Mheap) Grow(old []byte, size int64) ([]byte, error)

func (*Mheap) HostSize added in v0.5.1

func (m *Mheap) HostSize() int64

func (*Mheap) Size added in v0.5.1

func (m *Mheap) Size() int64

Jump to

Keyboard shortcuts

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