diff --git a/C/alloc.c b/C/alloc.c index b102196e0..20fbc91a5 100644 --- a/C/alloc.c +++ b/C/alloc.c @@ -12,7 +12,7 @@ * Last rev: * * mods: * * comments: allocating space * -* version:$Id: alloc.c,v 1.93 2008-04-06 11:53:02 vsc Exp $ * +* version:$Id: alloc.c,v 1.94 2008-04-06 12:06:48 vsc Exp $ * *************************************************************************/ #ifdef SCCS static char SccsId[] = "%W% %G%"; @@ -743,7 +743,7 @@ InitWorkSpace(Int s) Yap_page_size = si.dwPageSize; s = ((s+ (YAP_ALLOC_SIZE-1))/YAP_ALLOC_SIZE)*YAP_ALLOC_SIZE; brk = (LPVOID)Yap_page_size; - if (!ExtendWorkSpace(s+1024*1024,0)) + if (!ExtendWorkSpace(s,0)) return FALSE; return (MALLOC_T)brk-s; } @@ -1358,7 +1358,6 @@ Yap_InitMemory(int Trail, int Heap, int Stack) sa = Stack; /* stack area size */ ta = Trail; /* trail area size */ - pm += 1024*1024; InitHeap(InitWorkSpace(pm)); Yap_TrailTop = Yap_HeapBase + pm; diff --git a/H/rheap.h b/H/rheap.h index be371de66..fb5fbd60f 100644 --- a/H/rheap.h +++ b/H/rheap.h @@ -11,8 +11,11 @@ * File: rheap.h * * comments: walk through heap code * * * -* Last rev: $Date: 2008-04-06 11:53:02 $,$Author: vsc $ * +* Last rev: $Date: 2008-04-06 12:06:48 $,$Author: vsc $ * * $Log: not supported by cvs2svn $ +* Revision 1.94 2008/04/06 11:53:02 vsc +* fix some restore bugs +* * Revision 1.93 2008/04/04 09:10:02 vsc * restore was restoring twice * @@ -1423,8 +1426,9 @@ RestoreEntries(PropEntry *pp, int int_key) } me->AtomOfME = AtomAdjust(me->AtomOfME); - me->NextME = (struct mod_entry *) - AddrAdjust((ADDR)me->NextME); + if (me->NextME) + me->NextME = (struct mod_entry *) + AddrAdjust((ADDR)me->NextME); } break; case ExpProperty: