diff options
author | Damien Doligez <damien.doligez-inria.fr> | 2010-09-03 16:31:32 +0000 |
---|---|---|
committer | Damien Doligez <damien.doligez-inria.fr> | 2010-09-03 16:31:32 +0000 |
commit | eb93a24b5b0ddf99eb5a3fb09a0cba23f62ae9a3 (patch) | |
tree | 7b5a1577cb5f1fd4acbf1e0ba5be3057e67141e2 | |
parent | 07f197af0660f9762c5e44bdd63dce90eb33e9d8 (diff) | |
download | ocaml-eb93a24b5b0ddf99eb5a3fb09a0cba23f62ae9a3.tar.gz |
fix bug with huge values in OCAMLRUNPARAM
git-svn-id: http://caml.inria.fr/svn/ocaml/version/3.12@10668 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | VERSION | 2 | ||||
-rw-r--r-- | byterun/gc_ctrl.c | 4 | ||||
-rw-r--r-- | byterun/startup.c | 2 |
3 files changed, 5 insertions, 3 deletions
@@ -1,4 +1,4 @@ -3.12.1+dev3 (2010-08-18) +3.12.1+dev4 (2010-09-03) # The version string is the first line of this file. # It must be in the format described in stdlib/sys.mli diff --git a/byterun/gc_ctrl.c b/byterun/gc_ctrl.c index 0fe2215155..17c4d1fd02 100644 --- a/byterun/gc_ctrl.c +++ b/byterun/gc_ctrl.c @@ -481,7 +481,9 @@ void caml_init_gc (uintnat minor_size, uintnat major_size, { uintnat major_heap_size = Bsize_wsize (norm_heapincr (major_size)); - caml_page_table_initialize(Bsize_wsize(minor_size) + major_heap_size); + if (caml_page_table_initialize(Bsize_wsize(minor_size) + major_heap_size)){ + caml_fatal_error ("OCaml runtime error: cannot initialize page table\n"); + } caml_set_minor_heap_size (Bsize_wsize (norm_minsize (minor_size))); caml_major_heap_increment = Bsize_wsize (norm_heapincr (major_incr)); caml_percent_free = norm_pfree (percent_fr); diff --git a/byterun/startup.c b/byterun/startup.c index b69c04f220..20e61e7d2f 100644 --- a/byterun/startup.c +++ b/byterun/startup.c @@ -288,7 +288,7 @@ static int parse_command_line(char **argv) static void scanmult (char *opt, uintnat *var) { char mult = ' '; - int val; + unsigned int val; sscanf (opt, "=%u%c", &val, &mult); sscanf (opt, "=0x%x%c", &val, &mult); switch (mult) { |