fix memory leak
fix overflow handling VS: ---------------------------------------------------------------------- git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1702 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
13
C/absmi.c
13
C/absmi.c
@@ -10,8 +10,12 @@
|
||||
* *
|
||||
* File: absmi.c *
|
||||
* comments: Portable abstract machine interpreter *
|
||||
* Last rev: $Date: 2006-10-10 20:21:42 $,$Author: vsc $ *
|
||||
* Last rev: $Date: 2006-10-11 14:53:57 $,$Author: vsc $ *
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 1.207 2006/10/10 20:21:42 vsc
|
||||
* fix new indexing code to actually recover space
|
||||
* fix predicate info to work for LUs
|
||||
*
|
||||
* Revision 1.206 2006/10/10 14:08:15 vsc
|
||||
* small fixes on threaded implementation.
|
||||
*
|
||||
@@ -2070,13 +2074,16 @@ Yap_absmi(int inp)
|
||||
LOCK(cl->ClLock);
|
||||
DEC_CLREF_COUNT(cl);
|
||||
cl->ClFlags &= ~InUseMask;
|
||||
erase = (cl->ClFlags & ErasedMask) && !(cl->ClRefCount);
|
||||
erase = (cl->ClFlags & (ErasedMask|DirtyMask)) && !(cl->ClRefCount);
|
||||
UNLOCK(cl->ClLock);
|
||||
if (erase) {
|
||||
/* at this point, we are the only ones accessing the clause,
|
||||
hence we don't need to have a lock it */
|
||||
saveregs();
|
||||
Yap_ErLogUpdIndex(cl);
|
||||
if (cl->ClFlags & ErasedMask)
|
||||
Yap_ErLogUpdIndex(cl);
|
||||
else
|
||||
Yap_CleanUpIndex(cl);
|
||||
setregs();
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user