misc fixes

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1100 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc
2004-07-23 19:02:09 +00:00
parent 16c1c87c50
commit 7c8001d035
2 changed files with 19 additions and 9 deletions

View File

@@ -12,7 +12,7 @@
* Last rev: *
* mods: *
* comments: allocating space *
* version:$Id: alloc.c,v 1.52 2004-07-22 21:32:20 vsc Exp $ *
* version:$Id: alloc.c,v 1.53 2004-07-23 19:02:09 vsc Exp $ *
*************************************************************************/
#ifdef SCCS
static char SccsId[] = "%W% %G%";
@@ -882,7 +882,10 @@ ExtendWorkSpace(Int s, int fixed_allocation)
}
} else if (a < WorkSpaceTop) {
/* try again */
return ExtendWorkSpace(s, fixed_allocation);
int res = ExtendWorkSpace(s, fixed_allocation);
/* release memory back to system */
munmap(a, s);
return res;
}
WorkSpaceTop = (char *) a + s;
Yap_PrologMode = OldPrologMode;