1 /**************************************************************************/
2 /*                                                                        */
3 /*                                 OCaml                                  */
4 /*                                                                        */
5 /*              Damien Doligez, projet Para, INRIA Rocquencourt           */
6 /*                                                                        */
7 /*   Copyright 1996 Institut National de Recherche en Informatique et     */
8 /*     en Automatique.                                                    */
9 /*                                                                        */
10 /*   All rights reserved.  This file is distributed under the terms of    */
11 /*   the GNU Lesser General Public License version 2.1, with the          */
12 /*   special exception on linking described in the file LICENSE.          */
13 /*                                                                        */
14 /**************************************************************************/
15 
16 #ifndef CAML_GC_CTRL_H
17 #define CAML_GC_CTRL_H
18 
19 #ifdef CAML_INTERNALS
20 
21 #include "misc.h"
22 
23 extern double
24      caml_stat_minor_words,
25      caml_stat_promoted_words,
26      caml_stat_major_words;
27 
28 extern intnat
29      caml_stat_minor_collections,
30      caml_stat_major_collections,
31      caml_stat_heap_wsz,
32      caml_stat_top_heap_wsz,
33      caml_stat_compactions,
34      caml_stat_heap_chunks;
35 
36 uintnat caml_normalize_heap_increment (uintnat);
37 
38 /*
39   minor_size: cf. minor_heap_size in gc.mli
40   major_size: Size in words of the initial major heap
41   major_incr: cf. major_heap_increment in gc.mli
42   percent_fr: cf. space_overhead in gc.mli
43   percent_m : cf. max_overhead in gc.mli
44   window    : cf. window_size in gc.mli
45 */
46 void caml_init_gc (uintnat minor_size, uintnat major_size, uintnat major_incr,
47                    uintnat percent_fr, uintnat percent_m, uintnat window);
48 
49 
50 CAMLextern value caml_gc_stat(value v);
51 
52 #ifdef DEBUG
53 void caml_heap_check (void);
54 #endif
55 
56 #endif /* CAML_INTERNALS */
57 
58 #endif /* CAML_GC_CTRL_H */
59