package accessor_core

  1. Overview
  2. Docs

Source file accessor_gc.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
open! Core
open! Import

module Stat = struct
  [%%if ocaml_version < (4, 12, 0)]

  type t = Gc.Stat.t =
    { minor_words : float
    ; promoted_words : float
    ; major_words : float
    ; minor_collections : int
    ; major_collections : int
    ; heap_words : int
    ; heap_chunks : int
    ; live_words : int
    ; live_blocks : int
    ; free_words : int
    ; free_blocks : int
    ; largest_free : int
    ; fragments : int
    ; compactions : int
    ; top_heap_words : int
    ; stack_size : int
    }
  [@@deriving accessors]

  [%%else]

  type t = Gc.Stat.t =
    { minor_words : float
    ; promoted_words : float
    ; major_words : float
    ; minor_collections : int
    ; major_collections : int
    ; heap_words : int
    ; heap_chunks : int
    ; live_words : int
    ; live_blocks : int
    ; free_words : int
    ; free_blocks : int
    ; largest_free : int
    ; fragments : int
    ; compactions : int
    ; top_heap_words : int
    ; stack_size : int
    ; forced_major_collections : int
    }
  [@@deriving accessors]

  [%%endif]
end