package tezos-protocol-alpha

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

This module provides overapproximation of memory footprint for Michelson-related values.

These overapproximations are used by the cache to evaluate its own memory footprint and enforce declared limit over its size.

value_size ty v returns an overapproximation of the size of the in-memory representation of v of type ty.

ty_size ty returns an overapproximation of the size of the in-memory representation of type ty.

comparable_ty_size cty returns an overapproximation of the size of the in-memory representation of comparable type cty.

lambda_size l returns an overapproximation of the size of the internal IR for the Michelson lambda abstraction l.

val kinstr_size : ('a, 's, 'r, 'f) Script_typed_ir.kinstr -> Cache_memory_helpers.nodes_and_size

kinstr_size i returns an overapproximation of the size of the internal IR i.

node_size root returns the size of the in-memory representation of root in bytes. This is an over-approximation of the memory actually consumed by root since no sharing is taken into account.

Zero vector (reexport from Cache_memory_helpers)

OCaml

Innovation. Community. Security.