package memtrace_viewer

  1. Overview
  2. Docs
Interactive memory profiler based on Memtrace

Install

Dune Dependency

Authors

Maintainers

Sources

memtrace_viewer-v0.16.0.tar.gz
sha256=bb50fc48fef748dffe7ff1e151021b1361500c432a8c2991065fd31fd474f817

doc/src/memtrace_viewer.common/identifier.ml.html

Source file identifier.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
open! Core
include Identifier_intf

module Make () : S_with_special = struct
  module T = struct
    type t = int [@@deriving equal, compare, hash, sexp, bin_io]
  end

  include T
  include Comparable.Make (T)
  include Hashable.Make (T)

  let max_value = Int.max_value
  let first_special = -1
  let next_special t = t - 1
  let is_special t = t < 0

  module Generator = struct
    type t = int ref [@@deriving sexp]

    let create () = ref 0

    let generate t =
      let id = !t in
      incr t;
      id
    ;;
  end
end
OCaml

Innovation. Community. Security.