From 8b775b33e3b181f6fa9a8ab9e4f8b04e8d9cf008 Mon Sep 17 00:00:00 2001 From: "Taylor R. Campbell" Date: Sat, 10 Feb 2007 19:22:13 +0000 Subject: [PATCH] Oops: because the available space after subtracting the space the primitive requested may be negative, use LONG_TO_FIXNUM instead of LONG_TO_UNSIGNED_FIXNUM. --- v7/src/microcode/bchmmg.c | 4 ++-- v7/src/microcode/memmag.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/v7/src/microcode/bchmmg.c b/v7/src/microcode/bchmmg.c index 0bd4b76d9..89303f0ff 100644 --- a/v7/src/microcode/bchmmg.c +++ b/v7/src/microcode/bchmmg.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: bchmmg.c,v 9.108 2007/02/10 19:17:38 riastradh Exp $ +$Id: bchmmg.c,v 9.109 2007/02/10 19:22:13 riastradh Exp $ Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -3402,7 +3402,7 @@ DEFINE_PRIMITIVE ("GARBAGE-COLLECT", Prim_garbage_collect, 1, 1, 0) Will_Push (CONTINUATION_SIZE); Store_Return (RC_NORMAL_GC_DONE); - exp_register = (LONG_TO_UNSIGNED_FIXNUM (MemTop - Free - GC_Space_Needed)); + exp_register = (LONG_TO_FIXNUM (MemTop - Free - GC_Space_Needed)); Save_Cont (); Pushed (); diff --git a/v7/src/microcode/memmag.c b/v7/src/microcode/memmag.c index f75c786b7..1298bcd93 100644 --- a/v7/src/microcode/memmag.c +++ b/v7/src/microcode/memmag.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: memmag.c,v 9.75 2007/02/10 19:17:38 riastradh Exp $ +$Id: memmag.c,v 9.76 2007/02/10 19:22:13 riastradh Exp $ Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -650,7 +650,7 @@ DEFINE_PRIMITIVE ("GARBAGE-COLLECT", Prim_garbage_collect, 1, 1, 0) Will_Push (CONTINUATION_SIZE); Store_Return (RC_NORMAL_GC_DONE); - exp_register = (LONG_TO_UNSIGNED_FIXNUM (MemTop - Free - GC_Space_Needed)); + exp_register = (LONG_TO_FIXNUM (MemTop - Free - GC_Space_Needed)); Save_Cont (); Pushed (); -- 2.25.1