forked from ocaml/ocaml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gc_ctrl.h
48 lines (38 loc) · 2.01 KB
/
gc_ctrl.h
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
/**************************************************************************/
/* */
/* OCaml */
/* */
/* Damien Doligez, projet Para, INRIA Rocquencourt */
/* */
/* Copyright 1996 Institut National de Recherche en Informatique et */
/* en Automatique. */
/* */
/* All rights reserved. This file is distributed under the terms of */
/* the GNU Lesser General Public License version 2.1, with the */
/* special exception on linking described in the file LICENSE. */
/* */
/**************************************************************************/
#ifndef CAML_GC_CTRL_H
#define CAML_GC_CTRL_H
#ifdef CAML_INTERNALS
#include "misc.h"
CAMLextern atomic_uintnat caml_max_stack_wsize;
CAMLextern uintnat caml_fiber_wsz;
CAMLextern uintnat caml_major_cycles_completed;
void caml_init_gc (void);
value caml_gc_stat(value);
value caml_gc_major(value);
#define caml_stat_top_heap_wsz caml_top_heap_words(Caml_state->shared_heap)
#define caml_stat_compactions 0
#define caml_stat_heap_wsz Wsize_bsize(caml_heap_size(Caml_state->shared_heap))
#define caml_stat_heap_chunks caml_heap_blocks(Caml_state->shared_heap)
#define caml_stat_major_collections caml_major_cycles_completed
#define caml_stat_promoted_words Caml_state->stat_promoted_words
#define caml_allocated_words Caml_state->allocated_words
#define caml_stat_major_words Caml_state->stat_major_words
#define caml_stat_minor_words Caml_state->stat_minor_words
#ifdef DEBUG
void caml_heap_check (void);
#endif
#endif /* CAML_INTERNALS */
#endif /* CAML_GC_CTRL_H */