protect heapgc.c

This commit is contained in:
Vitor Santos Costa 2012-05-13 15:58:28 +01:00
parent a05bad3bf0
commit b36e607cb4

View File

@ -4130,9 +4130,11 @@ call_gc(UInt gc_lim, Int predarity, CELL *current_env, yamop *nextop USES_REGS)
if (ASP - H < gc_margin/sizeof(CELL) ||
effectiveness < 20) {
LeaveGCMode( PASS_REGS1 );
#ifdef YAPOR
if (gc_margin < 2*CalculateStackGap())
gc_margin = 2*CalculateStackGap();
return Yap_growstack(gc_margin);
#endif
}
/*
* debug for(save_total=1; save_total<=N; ++save_total)