summaryrefslogtreecommitdiff
path: root/test/alloc.ml
diff options
context:
space:
mode:
Diffstat (limited to 'test/alloc.ml')
-rw-r--r--test/alloc.ml51
1 files changed, 0 insertions, 51 deletions
diff --git a/test/alloc.ml b/test/alloc.ml
deleted file mode 100644
index ea103e42af..0000000000
--- a/test/alloc.ml
+++ /dev/null
@@ -1,51 +0,0 @@
-(***********************************************************************)
-(* *)
-(* Objective Caml *)
-(* *)
-(* Damien Doligez, projet Para, INRIA Rocquencourt *)
-(* *)
-(* Copyright 1996 Institut National de Recherche en Informatique et *)
-(* en Automatique. All rights reserved. This file is distributed *)
-(* under the terms of the Q Public License version 1.0. *)
-(* *)
-(***********************************************************************)
-
-(* $Id$ *)
-
-(* Random allocation test *)
-
-(*
- Allocate arrays of strings, of random sizes in [0..1000[, and put them
- into an array of 32768. Replace a randomly-selected array with a new
- random-length array. Reiterate ad infinitum.
-*)
-
-let l = 32768;;
-let m = 1000;;
-
-let ar = Array.create l "";;
-
-Random.init 1234;;
-
-let compact_flag = ref false;;
-
-let main () =
- while true do
- for i = 1 to 100000 do
- ar.(Random.int l) <- String.create (Random.int m);
- done;
- if !compact_flag then Gc.compact () else Gc.full_major ();
- print_newline ();
- Gc.print_stat stdout;
- flush stdout;
- done
-;;
-
-let argspecs = [
- "-c", Arg.Set compact_flag, "do heap compactions";
-];;
-
-Arg.parse argspecs (fun _ -> ()) "Usage: alloc [-c]";;
-
-main ();;
-