Update of /cvsroot/monetdb/MonetDB5/src/optimizer
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv20708
Modified Files:
opt_emptySet.mx opt_factorize.mx
Log Message:
Minor cleanup as part of the memleak hunt.
Index: opt_emptySet.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/optimizer/opt_emptySet.mx,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- opt_emptySet.mx 17 Aug 2007 13:56:53 -0000 1.40
+++ opt_emptySet.mx 31 Oct 2007 08:27:38 -0000 1.41
@@ -131,7 +131,7 @@
int *alias;
int runonce= FALSE;
- int limit = mb->stop, ctop=0;
+ int limit = mb->stop, slimit= mb->ssize, ctop=0;
InstrPtr *old = mb->stmt, *constraints;
/* get query property */
@@ -139,8 +139,8 @@
if( fndArgProperty(mb,old[0],0,putName("inline",6)) )
return 0;
- newMalBlkStmt(mb, mb->stop); /* a new statement stack */
- constraints= (InstrPtr *) alloca(sizeof(InstrPtr)*limit);
+ newMalBlkStmt(mb, mb->ssize); /* a new statement stack */
+ constraints= (InstrPtr *) alloca(sizeof(InstrPtr)*slimit);
alias = (int*) alloca(sizeof(int)*mb->vtop);
for(i=0;i<mb->vtop; i++) alias[i]=i;
@@ -153,6 +153,7 @@
pushInstruction(mb,p);
if( p->token == ENDsymbol){
for(i++; i<limit; i++)
+ if( old[i])
pushInstruction(mb,old[i]);
break;
}
Index: opt_factorize.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/optimizer/opt_factorize.mx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- opt_factorize.mx 17 Aug 2007 13:56:53 -0000 1.12
+++ opt_factorize.mx 31 Oct 2007 08:27:38 -0000 1.13
@@ -133,10 +133,8 @@
for (i = 0; i < p->argc; i++)
varused[i] = 1;
- first = (InstrPtr *) GDKmalloc(mb->stop * sizeof(InstrPtr));
- second = (InstrPtr *) GDKmalloc(mb->stop * sizeof(InstrPtr));
- for (i = 0; i < mb->stop; i++)
- first[i] = second[i] = 0;
+ first = (InstrPtr *) GDKzalloc(mb->ssize * sizeof(InstrPtr));
+ second = (InstrPtr *) GDKzalloc(mb->ssize * sizeof(InstrPtr));
first[fk++] = getInstrPtr(mb, 0); /* to become a factory */
for (i = 1; i < mb->stop - 1; i++) {
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins