summaryrefslogtreecommitdiff
path: root/byterun/compact.c
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez@inria.fr>2015-12-02 12:18:41 +0100
committerDamien Doligez <damien.doligez@inria.fr>2015-12-21 14:27:46 +0100
commitc9003ac48fb1689eb0710bda885a8c025527aa65 (patch)
treecf59335089609fb8a42bbdb0e18ea637dfb49849 /byterun/compact.c
parent0225ca01e39289ce1801fb09cd011cdbfb542b8d (diff)
downloadocaml-c9003ac48fb1689eb0710bda885a8c025527aa65.tar.gz
fix huge pages vs renaming of caml_stat_heap_size
Diffstat (limited to 'byterun/compact.c')
-rw-r--r--byterun/compact.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/byterun/compact.c b/byterun/compact.c
index f48d056433..890feb5bee 100644
--- a/byterun/compact.c
+++ b/byterun/compact.c
@@ -437,7 +437,9 @@ void caml_compact_heap (void)
target_wsz = caml_clip_heap_chunk_wsz (target_wsz);
#ifdef HAS_HUGE_PAGES
- if (caml_use_huge_pages && caml_stat_heap_size <= HUGE_PAGE_SIZE) return;
+ if (caml_use_huge_pages
+ && Bsize_wsize (caml_stat_heap_wsz) <= HUGE_PAGE_SIZE)
+ return;
#endif
if (target_wsz < caml_stat_heap_wsz / 2){
@@ -489,7 +491,9 @@ void caml_compact_heap_maybe (void)
if (caml_stat_heap_wsz <= 2 * caml_clip_heap_chunk_wsz (0)) return;
#ifdef HAS_HUGE_PAGES
- if (caml_use_huge_pages && caml_stat_heap_size <= HUGE_PAGE_SIZE) return;
+ if (caml_use_huge_pages
+ && Bsize_wsize (caml_stat_heap_size) <= HUGE_PAGE_SIZE)
+ return;
#endif
fw = 3.0 * caml_fl_cur_wsz - 2.0 * caml_fl_wsz_at_phase_change;