don't get confused when expanding over a hole

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1176 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc
2004-11-17 05:24:20 +00:00
parent 5f5589e8de
commit 481d9d38fb
3 changed files with 6 additions and 2 deletions

View File

@@ -548,6 +548,7 @@ static_growheap(long size, int fix_code, struct intermediates *cip)
if (!Yap_ExtendWorkSpace(size)) {
Int min_size = AdjustPageSize(((CELL)Yap_TrailTop-(CELL)Yap_GlobalBase)+MinHeapGap);
Yap_ErrorMessage = NULL;
if (size < min_size) size = min_size;
minimal_request = size;
size = Yap_ExtendWorkSpaceThroughHole(size);
@@ -981,6 +982,7 @@ execute_growstack(long size0, int from_trail)
if (!Yap_ExtendWorkSpace(size)) {
/* make sure stacks and trail are contiguous */
Yap_ErrorMessage = NULL;
minimal_request = AdjustPageSize(((CELL)Yap_TrailTop-(CELL)Yap_GlobalBase)+4*MinHeapGap+size0);
size = Yap_ExtendWorkSpaceThroughHole(minimal_request);
@@ -1240,6 +1242,7 @@ static int do_growtrail(long size)
execute_growstack(size, TRUE);
#else
if (!Yap_ExtendWorkSpace(size)) {
Yap_ErrorMessage = NULL;
execute_growstack(size, TRUE);
}
YAPEnterCriticalSection();