Changeset: a510c417ed3a for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/a510c417ed3a
Modified Files:
        monetdb5/mal/mal_resource.c
Branch: default
Log Message:

Do a bit less fixing/unfixing.


diffs (29 lines):

diff --git a/monetdb5/mal/mal_resource.c b/monetdb5/mal/mal_resource.c
--- a/monetdb5/mal/mal_resource.c
+++ b/monetdb5/mal/mal_resource.c
@@ -66,13 +66,15 @@ getMemoryClaim(MalBlkPtr mb, MalStkPtr s
 
        (void)mb;
        if (stk->stk[getArg(pci, i)].vtype == TYPE_bat) {
-               b = BATdescriptor( stk->stk[getArg(pci, i)].val.bval);
+               bat bid = stk->stk[getArg(pci, i)].val.bval;
+               if (!BBPcheck(bid))
+                       return 0;
+               b = BBP_desc(bid);
                if (b == NULL)
                        return 0;
                MT_lock_set(&b->theaplock);
                if (flag && isVIEW(b)) {
                        MT_lock_unset(&b->theaplock);
-                       BBPunfix(b->batCacheid);
                        return 0;
                }
 
@@ -93,7 +95,6 @@ getMemoryClaim(MalBlkPtr mb, MalStkPtr s
                if( t > itotal)
                        itotal = t;
                //total = total > (lng)(MEMORY_THRESHOLD ) ? 
(lng)(MEMORY_THRESHOLD ) : total;
-               BBPunfix(b->batCacheid);
                if ( total < itotal)
                        total = itotal;
        }
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to