From: Guillermo J. Rozas Date: Tue, 4 Oct 1988 14:48:41 +0000 (+0000) Subject: Make DUMP-BAND always dump from the low heap so that the probability X-Git-Tag: 20090517-FFI~12527 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=caf2851b22838617aea24668c4b80c668f4a39fa;p=mit-scheme.git Make DUMP-BAND always dump from the low heap so that the probability of falling on the same addresses (and avoiding relocation) on restore increases. --- diff --git a/v7/src/microcode/fasdump.c b/v7/src/microcode/fasdump.c index 067944d3c..a01957b64 100644 --- a/v7/src/microcode/fasdump.c +++ b/v7/src/microcode/fasdump.c @@ -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);