memory

package
v0.0.0-...-cf91f57 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Addressable

type Addressable interface {
	Read(address uint32, size uint32) uint64
	Write(address uint32, size uint32, data uint64)
}

type Memory

type Memory struct {
	Blocks []*block
}

func New

func New() *Memory

func (*Memory) Alloc

func (m *Memory) Alloc(startAddress uint32, size uint32)

func (*Memory) LoadFromReader

func (m *Memory) LoadFromReader(startAddress uint32, reader io.Reader) (int, error)

LoadFromReader loads into memory from an io.Reader, allocating a new block at startAddress. The memory must not have been already allocated to another block.

func (*Memory) Read

func (m *Memory) Read(address uint32, size uint32) uint64

func (*Memory) Write

func (m *Memory) Write(address uint32, size uint32, data uint64)

Jump to

Keyboard shortcuts

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