package plebeia

  1. Overview
  2. Docs

Module Internal.Bud_cacheSource

Bud hashconsing based on the hashes

Sourcetype t

The cache table type

Sourcetype stat = {
  1. ever_hit : int;
  2. ever_added : int;
}
Sourceval get_stat : t -> stat
Sourceval empty : unit -> t

Create a new empty table

Sourceval pp_stat : Format.formatter -> t -> unit

Print out the stat

Sourceval find_opt : t -> Hash.t -> Plebeia__.Index.t option
Sourceval add : t -> Hash.t -> Plebeia__.Index.t -> unit
Sourceval size : t -> int

The number of the entries in the table.

The memory used for each entry is 16words(= 128bytes) in 64bit arch.

Sourceval shrink : int -> t -> unit

Shrink down the size of the table lower than the specified number.

Sourceval reachable_words : t -> int

Count the reachable words. Very heavy. Do not use it casually.

OCaml

Innovation. Community. Security.