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:
parent
3ccfa0edaa
commit
3e662aca31
6
C/save.c
6
C/save.c
@ -610,7 +610,10 @@ check_header(void)
|
|||||||
saved space */
|
saved space */
|
||||||
hp_size = get_cell();
|
hp_size = get_cell();
|
||||||
while (hp_size > Unsigned(AuxTop) - Unsigned(HeapBase)) {
|
while (hp_size > Unsigned(AuxTop) - Unsigned(HeapBase)) {
|
||||||
growheap(FALSE);
|
if(!growheap(FALSE)) {
|
||||||
|
Error(SYSTEM_ERROR,TermNil,ErrorMessage);
|
||||||
|
return(FALSE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (mode == DO_EVERYTHING) {
|
if (mode == DO_EVERYTHING) {
|
||||||
if ((lc_size = get_cell())+(gb_size=get_cell()) > Unsigned(LocalBase) - Unsigned(GlobalBase)) {
|
if ((lc_size = get_cell())+(gb_size=get_cell()) > Unsigned(LocalBase) - Unsigned(GlobalBase)) {
|
||||||
@ -853,6 +856,7 @@ static void
|
|||||||
restore_heap_regs(void)
|
restore_heap_regs(void)
|
||||||
{
|
{
|
||||||
HeapPlus = AddrAdjust(HeapPlus);
|
HeapPlus = AddrAdjust(HeapPlus);
|
||||||
|
HeapTop = AddrAdjust(HeapTop);
|
||||||
*((YAP_SEG_SIZE *) HeapTop) = InUseFlag;
|
*((YAP_SEG_SIZE *) HeapTop) = InUseFlag;
|
||||||
HeapMax = HeapUsed = OldHeapUsed;
|
HeapMax = HeapUsed = OldHeapUsed;
|
||||||
restore_codes();
|
restore_codes();
|
||||||
|
Reference in New Issue
Block a user