package octez-l2-libs

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
include Memory_sig.S
type memory
type t = memory
type size = int32
type address = int32
type offset = int32
type count = int32
exception Type
exception Bounds
exception SizeOverflow
exception SizeLimit
exception OutOfMemory
val page_size : int64
val alloc : Types.memory_type -> memory
val type_of : memory -> Types.memory_type
val size : memory -> size
val bound : memory -> int64
val grow : memory -> size -> unit
val load_byte : memory -> int64 -> int Lwt.t
val store_byte : memory -> int64 -> int -> unit Lwt.t
val load_bytes : memory -> address -> int -> string Lwt.t
val store_bytes : memory -> address -> string -> unit Lwt.t
val load_num : memory -> address -> offset -> Types.num_type -> Values.num Lwt.t
val store_num : memory -> address -> offset -> Values.num -> unit Lwt.t
val load_num_packed : Types.pack_size -> Types.extension -> memory -> address -> offset -> Types.num_type -> Values.num Lwt.t
val store_num_packed : Types.pack_size -> memory -> address -> offset -> Values.num -> unit Lwt.t
val load_vec : memory -> address -> offset -> Types.vec_type -> Values.vec Lwt.t
val store_vec : memory -> address -> offset -> Values.vec -> unit Lwt.t
val load_vec_packed : Types.pack_size -> Types.vec_extension -> memory -> address -> offset -> Types.vec_type -> Values.vec Lwt.t
val store_bytes_from_bytes : t -> address -> bytes -> unit Lwt.t

store_bytes_from_bytes memory offset bytes copies the contents of bytes into memory at the provided offset. Further modifications to bytes are not reflected in memory.

of_chunks mem_ty chunks creates a memory instance using chunks. Modifications are reflected bidirectionally, i.e. modifying the memory changes the chunks and vice versa.

OCaml

Innovation. Community. Security.