Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 17da2e62 authored by POTTIER Francois's avatar POTTIER Francois
Browse files

Time.ml: [stabilize_gc] was broken; just replace it with [Gc.compact].

parent 0524c252
No related branches found
No related tags found
No related merge requests found
......@@ -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()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment