adjust HeapTop in save.

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@631 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2002-10-09 04:26:48 +00:00
parent 3ccfa0edaa
commit 3e662aca31

View File

@ -610,7 +610,10 @@ check_header(void)
saved space */
hp_size = get_cell();
while (hp_size > Unsigned(AuxTop) - Unsigned(HeapBase)) {
growheap(FALSE);
if(!growheap(FALSE)) {
Error(SYSTEM_ERROR,TermNil,ErrorMessage);
return(FALSE);
}
}
if (mode == DO_EVERYTHING) {
if ((lc_size = get_cell())+(gb_size=get_cell()) > Unsigned(LocalBase) - Unsigned(GlobalBase)) {
@ -853,6 +856,7 @@ static void
restore_heap_regs(void)
{
HeapPlus = AddrAdjust(HeapPlus);
HeapTop = AddrAdjust(HeapTop);
*((YAP_SEG_SIZE *) HeapTop) = InUseFlag;
HeapMax = HeapUsed = OldHeapUsed;
restore_codes();