Make DUMP-BAND always dump from the low heap so that the probability
authorGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Tue, 4 Oct 1988 14:48:41 +0000 (14:48 +0000)
committerGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Tue, 4 Oct 1988 14:48:41 +0000 (14:48 +0000)
of falling on the same addresses (and avoiding relocation) on restore
increases.

v7/src/microcode/fasdump.c

index 067944d3c103d70031dbd26218fc9575ce9344bd..a01957b64cc96c902597dfccc58d61aea4a81364 100644 (file)
@@ -30,7 +30,7 @@ Technology nor of any adaptation thereof in any advertising,
 promotional, or sales literature without prior written consent from
 MIT in each case. */
 
-/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/fasdump.c,v 9.40 1988/08/15 20:45:56 cph Exp $
+/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/fasdump.c,v 9.41 1988/10/04 14:48:41 jinx Exp $
 
    This file contains code for fasdump and dump-band.
 */
@@ -502,7 +502,7 @@ DEFINE_PRIMITIVE ("DUMP-BAND", Prim_band_dump, 2, 2, 0)
   {
     long type_code;
 
-    type_code = (Type_Code (Arg1));
+    type_code = (OBJECT_TYPE (Arg1));
     if (! ((type_code == TC_COMPILED_ENTRY) ||
           (type_code == TC_CONTROL_POINT) ||
           (type_code == TC_ENTITY) ||
@@ -513,6 +513,15 @@ DEFINE_PRIMITIVE ("DUMP-BAND", Prim_band_dump, 2, 2, 0)
   }
   Arg_2_Type(TC_CHARACTER_STRING);
 
+  if (Unused_Heap < Heap_Bottom)
+  {
+    /* Cause the image to be in the low heap, to increase
+       the probability that no relocation is needed on reload.
+     */
+
+    Primitive_GC(0);
+  }
+
   if (!Open_Dump_File(Arg2, WRITE_FLAG))
   {
     Primitive_Error(ERR_ARG_2_BAD_RANGE);