minor bug fixes

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1934 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc
2007-09-24 09:02:33 +00:00
parent 0dc508eda0
commit ec2a3ab3b5
2 changed files with 18 additions and 13 deletions

View File

@@ -303,6 +303,16 @@ GrowArena(Term arena, CELL *pt, UInt old_size, UInt size, UInt arity)
}
size = size/sizeof(CELL);
arena = XREGS[arity+1];
#if 0
/* try to recover some room */
if (arena == GlobalArena) {
if (!Yap_gc(arity+1, ENV, P)) {
Yap_Error(OUT_OF_STACK_ERROR,TermNil,Yap_ErrorMessage);
return FALSE;
}
}
arena = XREGS[arity+1];
#endif
}
CreateNewArena(ArenaPt(arena), size+old_size);
return TRUE;
@@ -856,17 +866,6 @@ CopyTermToArena(Term t, Term arena, int share, UInt arity, Term *newarena, Term
case -1:
if (arena == GlobalArena)
GlobalArenaOverflows++;
/* handle arena overflow */
/* first, take care of useless stuff */
/*
if (!Yap_gc(arity+4, ENV, P)) {
Yap_Error(OUT_OF_STACK_ERROR,TermNil,Yap_ErrorMessage);
return 0L;
}
arena = XREGS[arity+2];
newarena = (Term *)XREGS[arity+3];
old_top = ArenaLimit(*newarena);
*/
if (!GrowArena(arena, old_top, old_size, min_grow, arity+4)) {
Yap_Error(OUT_OF_STACK_ERROR, TermNil, Yap_ErrorMessage);
return 0L;