diff options
| author | Max Mouratov <mmouratov@gmail.com> | 2016-11-14 03:31:58 +0500 |
|---|---|---|
| committer | Max Mouratov <mmouratov@gmail.com> | 2017-03-17 20:50:16 +0500 |
| commit | cef4a941c6e7b5ff423f4e9243bb66f42745e344 (patch) | |
| tree | 5626fac1e3ca449e300269a5052e47de374a4261 /asmrun | |
| parent | 742a68a042e022e44ba124766c278b6839c22c51 (diff) | |
| download | ocaml-cef4a941c6e7b5ff423f4e9243bb66f42745e344.tar.gz | |
runtime: caml_cleanup_on_exit flag added
Diffstat (limited to 'asmrun')
| -rw-r--r-- | asmrun/startup.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/asmrun/startup.c b/asmrun/startup.c index 9a67b95c2a..08850bb65e 100644 --- a/asmrun/startup.c +++ b/asmrun/startup.c @@ -105,6 +105,16 @@ value caml_startup_common(char **argv, int pooling) char * exe_name, * proc_self_exe; char tos; + /* Determine options */ +#ifdef DEBUG + caml_verb_gc = 0x3F; +#endif + caml_parse_ocamlrunparam(); +#ifdef DEBUG + caml_gc_message (-1, "### OCaml runtime: debug mode ###\n", 0); +#endif + if (caml_cleanup_on_exit) + pooling = 1; if (!caml_startup_aux(pooling)) return Val_unit; @@ -118,13 +128,6 @@ value caml_startup_common(char **argv, int pooling) #endif caml_init_custom_operations(); caml_top_of_stack = &tos; -#ifdef DEBUG - caml_verb_gc = 0x3F; -#endif - caml_parse_ocamlrunparam(); -#ifdef DEBUG - caml_gc_message (-1, "### OCaml runtime: debug mode ###\n", 0); -#endif caml_init_gc (caml_init_minor_heap_wsz, caml_init_heap_wsz, caml_init_heap_chunk_sz, caml_init_percent_free, caml_init_max_percent_free, caml_init_major_window); |
