summaryrefslogtreecommitdiffstats
path: root/byterun/gc_ctrl.c
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez-inria.fr>2002-02-01 12:23:58 +0000
committerDamien Doligez <damien.doligez-inria.fr>2002-02-01 12:23:58 +0000
commit15c25173cfd956592d37a7a7fe119cb0374437c7 (patch)
tree5ec909e86640d6fcdfd626c3bc4484189ec4fc2b /byterun/gc_ctrl.c
parentcb046b351af420933a158101e57112d9a6cd81d2 (diff)
ajout Gc.top_heap_words
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4335 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'byterun/gc_ctrl.c')
-rw-r--r--byterun/gc_ctrl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/byterun/gc_ctrl.c b/byterun/gc_ctrl.c
index 03aa52522..7d6249057 100644
--- a/byterun/gc_ctrl.c
+++ b/byterun/gc_ctrl.c
@@ -36,6 +36,7 @@ double stat_minor_words = 0.0,
long stat_minor_collections = 0,
stat_major_collections = 0,
stat_heap_size = 0, /* bytes */
+ stat_top_heap_size = 0, /* bytes */
stat_compactions = 0;
extern asize_t major_heap_increment; /* bytes; see major_gc.c */
@@ -210,7 +211,7 @@ static value heap_stats (int returnstats)
long heap_words = Wsize_bsize (stat_heap_size);
long cpct = stat_compactions;
- res = alloc_tuple (14);
+ res = alloc_tuple (15);
Store_field (res, 0, copy_double (minwords));
Store_field (res, 1, copy_double (prowords));
Store_field (res, 2, copy_double (majwords));
@@ -225,6 +226,7 @@ static value heap_stats (int returnstats)
Store_field (res, 11, Val_long (largest_free));
Store_field (res, 12, Val_long (fragments));
Store_field (res, 13, Val_long (cpct));
+ Store_field (res, 14, Val_long (Wsize_bsize (stat_top_heap_size)));
CAMLreturn (res);
}else{
CAMLreturn (Val_unit);