X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FHeapStackCheck.hc;fp=ghc%2Frts%2FHeapStackCheck.hc;h=5fa5f100e8406457153070b28c367362af1727bf;hb=0671ef05dd65137d501cb97f0e42be3b78d4004d;hp=72ca5530e41a344e96c2fdea754a593b0e1866c5;hpb=d7dedcdbb833d692a3be48e2405d2323fa4de72a;p=ghc-hetmet.git diff --git a/ghc/rts/HeapStackCheck.hc b/ghc/rts/HeapStackCheck.hc index 72ca553..5fa5f10 100644 --- a/ghc/rts/HeapStackCheck.hc +++ b/ghc/rts/HeapStackCheck.hc @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: HeapStackCheck.hc,v 1.17 2001/07/06 14:11:38 simonmar Exp $ + * $Id: HeapStackCheck.hc,v 1.18 2001/11/08 12:46:31 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -12,7 +12,6 @@ #include "Storage.h" /* for CurrentTSO */ #include "StgRun.h" /* for StgReturn and register saving */ #include "Schedule.h" /* for context_switch */ -#include "HeapStackCheck.h" /* Stack/Heap Check Failure * ------------------------ @@ -51,7 +50,8 @@ #define GC_GENERIC \ if (Hp > HpLim) { \ - if (ExtendNursery(Hp,HpLim)) { \ + Hp -= HpAlloc; \ + if (HpAlloc <= BLOCK_SIZE_W && ExtendNursery(Hp,HpLim)) {\ if (context_switch) { \ R1.i = ThreadYielding; \ } else { \ @@ -70,7 +70,8 @@ #define GC_ENTER \ if (Hp > HpLim) { \ - if (ExtendNursery(Hp,HpLim)) { \ + Hp -= HpAlloc; \ + if (HpAlloc <= BLOCK_SIZE_W && ExtendNursery(Hp,HpLim)) {\ if (context_switch) { \ R1.i = ThreadYielding; \ } else { \ @@ -151,7 +152,7 @@ EXTFUN(stg_gc_entertop) There are canned sequences for 'n' pointer values in registers. -------------------------------------------------------------------------- */ -EXTFUN(stg_gc_enter_1) +EXTFUN(__stg_gc_enter_1) { FB_ Sp -= 1; @@ -880,7 +881,7 @@ EXTFUN(stg_gc_ut_0_1) /*- 0 Regs -------------------------------------------------------------------*/ -EXTFUN(stg_chk_0) +EXTFUN(__stg_chk_0) { FB_ Sp -= 1; @@ -891,7 +892,7 @@ EXTFUN(stg_chk_0) /*- 1 Reg --------------------------------------------------------------------*/ -EXTFUN(stg_chk_1) +EXTFUN(__stg_chk_1) { FB_ Sp -= 2;