garbage collector was not asking for space.

avoid 0 sized calls to mmap.


git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2058 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc
2008-01-24 00:11:59 +00:00
parent 817663588d
commit e353d8811f
6 changed files with 28 additions and 7 deletions

View File

@@ -3867,8 +3867,10 @@ call_gc(UInt gc_lim, Int predarity, CELL *current_env, yamop *nextop)
/* expand the stack if effectiveness is less than 20 % */
if (ASP - H < gc_margin/sizeof(CELL) ||
effectiveness < 20) {
UInt sz;
LeaveGCMode();
return Yap_growstack(gc_margin-((ASP-H)*sizeof(CELL)));
return Yap_growstack(gc_margin);
}
/*
* debug for(save_total=1; save_total<=N; ++save_total)