Module Primus.Memory

Machine Memory.

Provides storage facilities. A machine can have multiple memories, e.g., RAM, ROM, HDD, cache, register files, etc. They are all accessed via the unified memory inteface using get and set primitives wich read and store bytes from the current memory. The current memory could be switched with the switch operation and its descriptor could be queried using the memory operation.

Each memory device has an independent address space and address bus width (which could be different from the virtual memory address size). Each memory could be segmented and can have its own TLB, which is usually implemented via the pagefault handlers.

type memory

abstract memory descriptor, see Descriptor.t

module Descriptor : sig ... end

Abstract memory descriptor.

type exn +=
  1. | Pagefault of Bap.Std.addr

occurs when a memory operation for the given addr cannot be satisfied.

val generated : (Bap.Std.addr * value) observation
module Make (Machine : Machine.S) : sig ... end

Make(Machine) lifts the memory interface into the Machine monad.