recover stack space

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2046 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2007-12-23 22:48:44 +00:00
parent 926d21808e
commit 65d3704e4b
4 changed files with 15 additions and 3 deletions

View File

@ -11,8 +11,12 @@
* File: cdmgr.c *
* comments: Code manager *
* *
* Last rev: $Date: 2007-12-18 17:46:58 $,$Author: vsc $ *
* Last rev: $Date: 2007-12-23 22:48:44 $,$Author: vsc $ *
* $Log: not supported by cvs2svn $
* Revision 1.215 2007/12/18 17:46:58 vsc
* purge_clauses does not need to do anything if there are no clauses
* fix gprof bugs.
*
* Revision 1.214 2007/11/28 23:52:14 vsc
* junction tree algorithm
*
@ -1259,7 +1263,6 @@ kill_off_lu_block(LogUpdIndex *c, LogUpdIndex *parent, PredEntry *ap)
static void
kill_first_log_iblock(LogUpdIndex *c, LogUpdIndex *parent, PredEntry *ap)
{
decrease_log_indices(c, (yamop *)&(ap->cs.p_code.ExpandCode));
/* parent is always locked, now I lock myself */
if (parent != NULL) {
/* remove myself from parent */
@ -1285,6 +1288,7 @@ kill_first_log_iblock(LogUpdIndex *c, LogUpdIndex *parent, PredEntry *ap)
/* make sure that a child cannot remove us */
kill_children(c, ap);
/* check if we are still the main index */
decrease_log_indices(c, (yamop *)&(ap->cs.p_code.ExpandCode));
if (!((c->ClFlags & InUseMask) || c->ClRefCount)) {
kill_off_lu_block(c, parent, ap);
} else {

View File

@ -3807,6 +3807,11 @@ p_total_erased(void)
LogUpdClause *cl = DBErasedList;
LogUpdIndex *icl = DBErasedIList;
int i=200000;
while (cl && i>0)
cl=cl->ClNext,i--;
if (cl)
fprintf(stderr,"cl=%p\n",cl);
/* only for log upds */
while (cl) {
cls++;

View File

@ -17,6 +17,8 @@
<h2>Yap-5.1.3:</h2>
<ul>
<li> FIXED: memory leak where I'd try to clear refs from an index
block before I released the kids (so the refs would never be released).</li>
<li> FIXED: small glitches with profon.</li>
<li> NEW: allow re-exporting other modules.</li>
<li> FIXED: graph add_ and del_ predicates should have the original

View File

@ -639,7 +639,8 @@ abolish(X) :-
fail.
'$abolishd'(T, M) :-
'$purge_clauses'(T,M), fail.
'$abolishd'(T, M) :- '$kill_dynamic'(T,M), fail.
'$abolishd'(T, M) :-
'$kill_dynamic'(T,M), fail.
'$abolishd'(_, _).
'$abolishs'(G, M) :- '$system_predicate'(G,M), !,