diff options
author | Damien Doligez <damien.doligez-inria.fr> | 1998-08-07 18:45:00 +0000 |
---|---|---|
committer | Damien Doligez <damien.doligez-inria.fr> | 1998-08-07 18:45:00 +0000 |
commit | 57c39132513f0b991a6e4f990baacbe5f30aef8a (patch) | |
tree | 41739ea26c025441f152d4f1d88d172cbf1ad6a1 | |
parent | 28db70829f293fe72b3f8a37de77353fa24b2fab (diff) |
changement gc_message
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2034 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | stdlib/gc.ml | 2 | ||||
-rw-r--r-- | stdlib/gc.mli | 17 |
2 files changed, 14 insertions, 5 deletions
diff --git a/stdlib/gc.ml b/stdlib/gc.ml index 29ae1f837..d654fff29 100644 --- a/stdlib/gc.ml +++ b/stdlib/gc.ml @@ -32,7 +32,7 @@ type control = { mutable minor_heap_size : int; mutable major_heap_increment : int; mutable space_overhead : int; - mutable verbose : bool; + mutable verbose : int; mutable max_overhead : int; mutable stack_limit : int };; diff --git a/stdlib/gc.mli b/stdlib/gc.mli index b6cc3ebc0..36eed543b 100644 --- a/stdlib/gc.mli +++ b/stdlib/gc.mli @@ -67,7 +67,7 @@ type control = { mutable minor_heap_size : int; mutable major_heap_increment : int; mutable space_overhead : int; - mutable verbose : bool; + mutable verbose : int; mutable max_overhead : int; mutable stack_limit : int } @@ -92,8 +92,17 @@ type control = { (this setting is intended for testing purposes only). If [max_overhead >= 1000000], compaction is never triggered. Default: 1000000. -- [verbose] This flag controls the GC messages on standard error output. - Default: false. +- [verbose] This value controls the GC messages on standard error output. + It is a sum of some of the following flags, to print messages + on the corresponding events: +- [1 ] Start of major GC cycle. +- [2 ] Minor collection and major GC slice. +- [4 ] Growing and shrinking of the heap. +- [8 ] Resizing of stacks and memory manager tables. +- [16] Heap compaction. +- [32] Change of GC parameters. +- [64] Computation of major GC slice size. + Default: 0. - [stack_limit] The maximum size of the stack (in words). This is only relevant to the byte-code runtime, as the native code runtime uses the operating system's stack. Default: 256k. @@ -112,7 +121,7 @@ external set : control -> unit = "gc_set" The normal usage is: [ let r = Gc.get () in (* Get the current parameters. *) - r.verbose <- true; (* Change some of them. *) + r.verbose <- 13; (* Change some of them. *) Gc.set r (* Set the new values. *) ] *) |