changement gc_message

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2034 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Damien Doligez 1998-08-07 18:45:00 +00:00
parent 28db70829f
commit 57c3913251
2 changed files with 14 additions and 5 deletions

View File

@ -32,7 +32,7 @@ type control = {
mutable minor_heap_size : int; mutable minor_heap_size : int;
mutable major_heap_increment : int; mutable major_heap_increment : int;
mutable space_overhead : int; mutable space_overhead : int;
mutable verbose : bool; mutable verbose : int;
mutable max_overhead : int; mutable max_overhead : int;
mutable stack_limit : int mutable stack_limit : int
};; };;

View File

@ -67,7 +67,7 @@ type control = {
mutable minor_heap_size : int; mutable minor_heap_size : int;
mutable major_heap_increment : int; mutable major_heap_increment : int;
mutable space_overhead : int; mutable space_overhead : int;
mutable verbose : bool; mutable verbose : int;
mutable max_overhead : int; mutable max_overhead : int;
mutable stack_limit : int mutable stack_limit : int
} }
@ -92,8 +92,17 @@ type control = {
(this setting is intended for testing purposes only). (this setting is intended for testing purposes only).
If [max_overhead >= 1000000], compaction is never triggered. If [max_overhead >= 1000000], compaction is never triggered.
Default: 1000000. Default: 1000000.
- [verbose] This flag controls the GC messages on standard error output. - [verbose] This value controls the GC messages on standard error output.
Default: false. 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 - [stack_limit] The maximum size of the stack (in words). This is only
relevant to the byte-code runtime, as the native code runtime relevant to the byte-code runtime, as the native code runtime
uses the operating system's stack. Default: 256k. uses the operating system's stack. Default: 256k.
@ -112,7 +121,7 @@ external set : control -> unit = "gc_set"
The normal usage is: The normal usage is:
[ [
let r = Gc.get () in (* Get the current parameters. *) 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. *) Gc.set r (* Set the new values. *)
] ]
*) *)