diff options
author | Damien Doligez <damien.doligez-inria.fr> | 1999-11-18 17:57:48 +0000 |
---|---|---|
committer | Damien Doligez <damien.doligez-inria.fr> | 1999-11-18 17:57:48 +0000 |
commit | f9dafc4088e83c27f3bded6bd53652532e8841b9 (patch) | |
tree | 880af05757edaa27614c50762ae86c40dd869f38 | |
parent | aeb4577098248f6327a258b943edbb1450017f46 (diff) |
CAMLRUNPARAM -> OCAMLRUNPARAM
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2570 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | asmrun/startup.c | 5 | ||||
-rw-r--r-- | man/ocamlrun.m | 58 | ||||
-rw-r--r-- | test/Makefile | 2 | ||||
-rw-r--r-- | test/Makefile.nt | 2 | ||||
-rw-r--r-- | test/Moretest/Makefile | 2 |
5 files changed, 61 insertions, 8 deletions
diff --git a/asmrun/startup.c b/asmrun/startup.c index 41147a282..6c3d7ac5c 100644 --- a/asmrun/startup.c +++ b/asmrun/startup.c @@ -84,7 +84,10 @@ static void scanmult (char *opt, long unsigned int *var) static void parse_camlrunparam(void) { - char *opt = getenv ("CAMLRUNPARAM"); + char *opt = getenv ("OCAMLRUNPARAM"); + + if (opt == NULL) opt = getenv ("CAMLRUNPARAM"); + if (opt != NULL){ while (*opt != '\0'){ switch (*opt++){ diff --git a/man/ocamlrun.m b/man/ocamlrun.m index f63a70833..0fff44d76 100644 --- a/man/ocamlrun.m +++ b/man/ocamlrun.m @@ -50,11 +50,17 @@ to signal garbage collections and heap extensions. The following environment variable are also consulted: .TP -.B CAMLRUNPARAM +.B OCAMLRUNPARAM Set the garbage collection parameters. +(If +.B OCAMLRUNPARAM +is not set, +.B CAMLRUNPARAM +will be used instead.) This variable must be a sequence of parameter specifications. A parameter specification is an option letter followed by an = -sign and a decimal number. There are four options: +sign, a decimal number, and an optional multiplier. There are seven +options: .TP .BR s \ (minor_heap_size) Size of the minor heap. @@ -65,9 +71,53 @@ Minimum size increment for the major heap. .BR o \ (space_overhead) The major GC speed setting. .TP +.BR O \ (max_overhead) +The heap compaction trigger setting. +.TP +.BR l \ (stack_limit) +The limit (in words) of the stack size. +.TP +.BR h +The initial size of the major heap (in words). +.TP .BR v \ (verbose) -Whether to print GC messages or not. 0 is -false; 1 is true; other values may give unexpected results. +What GC messages to print to stderr. This is a sum of values selected +from the following: +.TP +.BR 1 +Start of major GC cycle. +.TP +.BR 2 +Minor collection and major GC slice. +.TP +.BR 4 +Growing and shrinking of the heap. +.TP +.BR 8 +Resizing of stacks and memory manager tables. +.TP +.BR 16 +Heap compaction. +.TP +.BR 32 +Change of GC parameters. +.TP +.BR 64 +Computation of major GC slice size. + +The multiplier is +.B k +, +.B M +, or +.B G +, for multiplication by 2^10, 2^20, and 2^30 respectively. +For example, on a 32-bit machine under bash, the command +.B export OCAMLRUNPARAM='s=256k,v=1' +tells a subsequent +.B ocamlrun +to set its initial minor heap size to 1 megabyte and to print +a message at the start of each major GC cycle. .TP .B PATH diff --git a/test/Makefile b/test/Makefile index 763c83cec..bdc93082c 100644 --- a/test/Makefile +++ b/test/Makefile @@ -22,7 +22,7 @@ CAMLYACC=../yacc/ocamlyacc CAMLLEX=../boot/ocamlrun ../lex/ocamllex CAMLDEP=../boot/ocamlrun ../tools/ocamldep CAMLRUN=../byterun/ocamlrun -CODERUNPARAMS=CAMLRUNPARAM='o=100' +CODERUNPARAMS=OCAMLRUNPARAM='o=100' BYTE_EXE=fib.byt takc.byt taku.byt sieve.byt quicksort.byt quicksort.fast.byt \ fft.byt fft.fast.byt soli.byt soli.fast.byt boyer.byt kb.byt \ diff --git a/test/Makefile.nt b/test/Makefile.nt index b56f68a1e..a6cdcae26 100644 --- a/test/Makefile.nt +++ b/test/Makefile.nt @@ -22,7 +22,7 @@ CAMLYACC=..\yacc\ocamlyacc CAMLLEX=..\boot\ocamlrun ..\lex\ocamllex CAMLDEP=..\boot\ocamlrun ..\tools\ocamldep CAMLRUN=..\byterun\ocamlrun -CODERUNPARAMS=CAMLRUNPARAM='o=100' +CODERUNPARAMS=OCAMLRUNPARAM='o=100' BYTE_EXE=fib.byt takc.byt taku.byt sieve.byt quicksort.byt quicksort.fast.byt \ fft.byt fft.fast.byt soli.byt soli.fast.byt boyer.byt kb.byt \ diff --git a/test/Moretest/Makefile b/test/Moretest/Makefile index 50d06c8c0..4a5dd5bff 100644 --- a/test/Moretest/Makefile +++ b/test/Moretest/Makefile @@ -19,7 +19,7 @@ CAMLOPT=../../boot/ocamlrun ../../ocamlopt -I ../../stdlib OPTFLAGS=-S CAMLDEP=../../boot/ocamlrun ../../tools/ocamldep CAMLRUN=../../byterun/ocamlrun -CODERUNPARAMS=CAMLRUNPARAM='o=100' +CODERUNPARAMS=OCAMLRUNPARAM='o=100' callback.byt: callback.cmo callbackprim.o $(CAMLC) -o callback.byt -custom callback.cmo callbackprim.o ../../otherlibs/unix/libunix.a |