summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>1995-12-05 13:08:36 +0000
committerXavier Leroy <xavier.leroy@inria.fr>1995-12-05 13:08:36 +0000
commit841f9ba2568ebe323cd78693c19353431d846b35 (patch)
treef1d35db9ce9f625e01112348c1e68411e5f0921a
parentc51423ce737df4c8e18f468d9ca082a066387184 (diff)
Mettre toujours global_data en zone majeure.
(Necessaire pour raise_out_of_memory.) git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@507 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--byterun/main.c3
-rw-r--r--byterun/roots.c8
2 files changed, 4 insertions, 7 deletions
diff --git a/byterun/main.c b/byterun/main.c
index 581e243e5..db11066cf 100644
--- a/byterun/main.c
+++ b/byterun/main.c
@@ -26,6 +26,7 @@
#include "interp.h"
#include "intext.h"
#include "io.h"
+#include "minor_gc.h"
#include "misc.h"
#include "mlvalues.h"
#include "stacks.h"
@@ -230,6 +231,8 @@ int main(argc, argv)
chan = open_descr(fd);
global_data = input_value(chan);
close_in(chan);
+ /* Ensure that the globals are in the major heap. */
+ oldify(global_data, &global_data);
sys_init(argv + i);
interprete(start_code, code_size);
diff --git a/byterun/roots.c b/byterun/roots.c
index 0875f8340..af1fe12cc 100644
--- a/byterun/roots.c
+++ b/byterun/roots.c
@@ -44,7 +44,7 @@ void register_global_root(r)
global_roots = gr;
}
-/* Call [oldify] on all roots */
+/* Call [oldify] on all roots except [global_data] */
void oldify_local_roots ()
{
@@ -52,9 +52,6 @@ void oldify_local_roots ()
value * block;
struct global_root * gr;
- /* Global variables */
- oldify(global_data, &global_data);
-
/* The stack */
for (sp = extern_sp; sp < stack_high; sp++) {
oldify (*sp, sp);
@@ -101,6 +98,3 @@ void darken_all_roots ()
/* Hook */
if (scan_roots_hook != NULL) (*scan_roots_hook)(darken);
}
-
-
-