Changeset: 418da4007c08 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=418da4007c08
Modified Files:
        monetdb5/optimizer/opt_garbageCollector.c
Branch: Jul2017_1-GC
Log Message:

Backing-out changesets aebb813568b4, c68f57e45fe2, d350ab890b8e, 7e644e67e308,
which effectively disabled ("early") MAL variable clean-up (garbage collection)
between Dec2016 & Jul2017
(here: changeset 7e644e67e308).


diffs (75 lines):

diff --git a/monetdb5/optimizer/opt_garbageCollector.c 
b/monetdb5/optimizer/opt_garbageCollector.c
--- a/monetdb5/optimizer/opt_garbageCollector.c
+++ b/monetdb5/optimizer/opt_garbageCollector.c
@@ -30,14 +30,13 @@ OPTgarbageCollectorImplementation(Client
        int actions = 0;
        char buf[256];
        lng usec = GDKusec();
-       //int *varlnk, *stmtlnk;
+       int *varlnk, *stmtlnk;
 
        (void) pci;
        (void) cntxt;
        (void) stk;
        if ( mb->inlineProp)
                return 0;
-/*
        varlnk = (int*) GDKzalloc(mb->vtop * sizeof(int));
        if( varlnk == NULL)
                return 0;
@@ -46,7 +45,6 @@ OPTgarbageCollectorImplementation(Client
                GDKfree(varlnk);
                return 0;
        }
-*/
        
        old= mb->stmt;
        limit = mb->stop;
@@ -70,7 +68,6 @@ OPTgarbageCollectorImplementation(Client
 
        // Actual garbage collection stuff
        // Construct the linked list of variables based on end-of-scope
-/*
        setVariableScope(mb);
        for( i = 0; i < mb->vtop; i++){
                assert(getEndScope(mb,i) >= 0);
@@ -78,7 +75,6 @@ OPTgarbageCollectorImplementation(Client
          varlnk[i] = stmtlnk[getEndScope(mb,i)];
          stmtlnk[getEndScope(mb,i)] = i;
        }
-*/
 
        if ( newMalBlkStmt(mb,mb->ssize) < 0) 
                throw(MAL, "optimizer.garbagecollector", MAL_MALLOC_FAIL);
@@ -101,9 +97,9 @@ OPTgarbageCollectorImplementation(Client
 
                /* A block exit is never within a parallel block,
                 * otherwise we could not inject the assignment */
+               if (blockExit(p) ){
                        /* force garbage collection of all declared within 
output block and ending here  */
 /* ignore for the time being, it requires a more thorough analysis of 
dependencies.
-               if (blockExit(p) ){
                        for( k = stmtlnk[i]; k; k = varlnk[k])
                        if( isaBatType(getVarType(mb,k)) ){
                                q = newAssignment(mb);
@@ -115,8 +111,8 @@ OPTgarbageCollectorImplementation(Client
                                setVarEolife(mb,k,mb->stop-1);
                                actions++;
                        }
+*/
                }
-*/
        }
        assert(p);
        assert( p->token == ENDsymbol);
@@ -127,8 +123,8 @@ OPTgarbageCollectorImplementation(Client
                if (old[i])
                        freeInstruction(old[i]);
        getInstrPtr(mb,0)->gc |= GARBAGECONTROL;
-       //GDKfree(varlnk);
-       //GDKfree(stmtlnk);
+       GDKfree(varlnk);
+       GDKfree(stmtlnk);
        GDKfree(old);
 #ifdef DEBUG_OPT_GARBAGE
        {       int k;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to