save area was not being saved correctly.
This commit is contained in:
parent
7f9f10a1d9
commit
14b1f65e35
21
C/save.c
21
C/save.c
@ -450,10 +450,18 @@ save_regs(int mode)
|
||||
/* Then the start of the free code */
|
||||
if (putcellptr(CellPtr(FreeBlocks)) < 0)
|
||||
return -1;
|
||||
if (putcellptr(CellPtr(AuxBase)) < 0)
|
||||
return -1;
|
||||
if (putcellptr(AuxSp) < 0)
|
||||
return -1;
|
||||
if (putcellptr(CellPtr(AuxTop)) < 0)
|
||||
return -1;
|
||||
if (putcellptr(CellPtr(ScratchPad.ptr)) < 0)
|
||||
return -1;
|
||||
if (putout(ScratchPad.sz) < 0)
|
||||
return -1;
|
||||
if (putout(ScratchPad.msz) < 0)
|
||||
return -1;
|
||||
if (mode == DO_EVERYTHING) {
|
||||
/* put the old trail base, just in case it moves again */
|
||||
if (putout(ARG1) < 0)
|
||||
@ -754,12 +762,24 @@ get_heap_info(void)
|
||||
if (Yap_ErrorMessage)
|
||||
return -1;
|
||||
FreeBlocks = (BlockHeader *) get_cellptr();
|
||||
if (Yap_ErrorMessage)
|
||||
return -1;
|
||||
AuxBase = (ADDR)get_cellptr();
|
||||
if (Yap_ErrorMessage)
|
||||
return -1;
|
||||
AuxSp = get_cellptr();
|
||||
if (Yap_ErrorMessage)
|
||||
return -1;
|
||||
AuxTop = (ADDR)get_cellptr();
|
||||
if (Yap_ErrorMessage)
|
||||
return -1;
|
||||
ScratchPad.ptr = (ADDR)get_cellptr();
|
||||
if (Yap_ErrorMessage)
|
||||
return -1;
|
||||
ScratchPad.sz = get_cell();
|
||||
if (Yap_ErrorMessage)
|
||||
return -1;
|
||||
ScratchPad.msz = get_cell();
|
||||
if (Yap_ErrorMessage)
|
||||
return -1;
|
||||
HDiff = Unsigned(Yap_HeapBase) - Unsigned(OldHeapBase);
|
||||
@ -1184,6 +1204,7 @@ RestoreFreeSpace(void)
|
||||
AuxSp = PtoHeapCellAdjust(AuxSp);
|
||||
AuxBase = AddrAdjust(AuxBase);
|
||||
AuxTop = AddrAdjust(AuxTop);
|
||||
ScratchPad.ptr = AddrAdjust(ScratchPad.ptr);
|
||||
}
|
||||
}
|
||||
#else
|
||||
|
Reference in New Issue
Block a user