From 17da2e62d3539443cbc30cf08706e3c76175bf03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franc=CC=A7ois=20Pottier?= <francois.pottier@inria.fr> Date: Thu, 20 Jan 2022 09:51:53 +0100 Subject: [PATCH] Time.ml: [stabilize_gc] was broken; just replace it with [Gc.compact]. --- benchmark/src/Time.ml | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/benchmark/src/Time.ml b/benchmark/src/Time.ml index e3d257a..74b26a0 100644 --- a/benchmark/src/Time.ml +++ b/benchmark/src/Time.ml @@ -12,18 +12,6 @@ (******************************************************************************) open Printf -open Gc - -let stabilize_gc () = - Gc.compact (); - let rec loop failsafe last_heap_live_words = - if failsafe <= 0 then - failwith "unable to stabilize the number of live words in the major heap"; - let stat = Gc.stat () in - if stat.live_words <> last_heap_live_words then - loop (failsafe - 1) stat.live_words - in - loop 10 0 (* Measuring the execution time. *) @@ -31,7 +19,7 @@ exception CannotRun let measured_run factor repetitions f = try - stabilize_gc(); + Gc.compact(); let t1 = Sys.time() in for _ = 0 to repetitions-1 do f() -- GitLab