fix aux allocation
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2056 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
637f381d94
commit
1a2d89a423
@ -12,7 +12,7 @@
|
|||||||
* Last rev: *
|
* Last rev: *
|
||||||
* mods: *
|
* mods: *
|
||||||
* comments: allocating space *
|
* comments: allocating space *
|
||||||
* version:$Id: alloc.c,v 1.87 2008-01-23 17:57:44 vsc Exp $ *
|
* version:$Id: alloc.c,v 1.88 2008-01-23 18:25:19 vsc Exp $ *
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
#ifdef SCCS
|
#ifdef SCCS
|
||||||
static char SccsId[] = "%W% %G%";
|
static char SccsId[] = "%W% %G%";
|
||||||
@ -195,6 +195,7 @@ Yap_ExpandPreAllocCodeSpace(UInt sz0, void *cip)
|
|||||||
Yap_PrologMode |= MallocMode;
|
Yap_PrologMode |= MallocMode;
|
||||||
}
|
}
|
||||||
Yap_PrologMode &= ~MallocMode;
|
Yap_PrologMode &= ~MallocMode;
|
||||||
|
ScratchPad.sz = ScratchPad.msz = sz;
|
||||||
ScratchPad.ptr = ptr;
|
ScratchPad.ptr = ptr;
|
||||||
AuxSp = (CELL *)(AuxTop = ptr+sz);
|
AuxSp = (CELL *)(AuxTop = ptr+sz);
|
||||||
return ptr;
|
return ptr;
|
||||||
@ -655,6 +656,9 @@ Yap_AllocCodeSpace(unsigned int size)
|
|||||||
ADDR
|
ADDR
|
||||||
Yap_ExpandPreAllocCodeSpace(UInt sz, void *cip)
|
Yap_ExpandPreAllocCodeSpace(UInt sz, void *cip)
|
||||||
{
|
{
|
||||||
|
if (sz < SCRATCH_INC_SIZE)
|
||||||
|
sz = SCRATCH_INC_SIZE;
|
||||||
|
sz = AdjustLargePageSize(sz+sz/4);
|
||||||
if (!Yap_growheap((cip!=NULL), sz, cip)) {
|
if (!Yap_growheap((cip!=NULL), sz, cip)) {
|
||||||
Yap_Error(OUT_OF_HEAP_ERROR, TermNil, Yap_ErrorMessage);
|
Yap_Error(OUT_OF_HEAP_ERROR, TermNil, Yap_ErrorMessage);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
<h2>Yap-5.1.3:</h2>
|
<h2>Yap-5.1.3:</h2>
|
||||||
<ul>
|
<ul>
|
||||||
|
<li> FIXED: Aux reallocation should always increase aux size.</li>
|
||||||
<li> NEW: start atom garbage collector by default (except for threads).</li>
|
<li> NEW: start atom garbage collector by default (except for threads).</li>
|
||||||
<li> FIXED: restore indices should run over the indices, and not mess
|
<li> FIXED: restore indices should run over the indices, and not mess
|
||||||
them up.</li>
|
them up.</li>
|
||||||
|
Reference in New Issue
Block a user