File: test_gc.ml

package info (click to toggle)
js-of-ocaml 6.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 37,932 kB
  • sloc: ml: 135,957; javascript: 58,364; ansic: 437; makefile: 422; sh: 12; perl: 4
file content (40 lines) | stat: -rw-r--r-- 912 bytes parent folder | download
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
(* TEST *)

type stat =
  { 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
  }

type control =
  { minor_heap_size : int
  ; major_heap_increment : int
  ; space_overhead : int
  ; verbose : int
  ; max_overhead : int
  ; stack_limit : int
  ; allocation_policy : int
  ; window_size : int
  ; custom_major_ratio : int
  ; custom_minor_ratio : int
  ; custom_minor_max_size : int
  }

let () =
  assert ((Gc.get ()).custom_minor_max_size = 0);
  assert ((Gc.stat ()).forced_major_collections = 0);
  assert ((Gc.quick_stat ()).forced_major_collections = 0)