Changeset: 4cf4ab22910e for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4cf4ab22910e
Modified Files:
MonetDB5/src/optimizer/opt_reorder.mx
Branch: Jun2010
Log Message:
Reduce the amount of space allocated
The dependency table was too large, expecting the worse.
diffs (35 lines):
diff -r b6c69da89ab1 -r 4cf4ab22910e MonetDB5/src/optimizer/opt_reorder.mx
--- a/MonetDB5/src/optimizer/opt_reorder.mx Wed Jul 28 08:15:21 2010 +0200
+++ b/MonetDB5/src/optimizer/opt_reorder.mx Wed Jul 28 10:29:07 2010 +0200
@@ -102,11 +102,10 @@
}
for ( i=0; i< mb->stop; i++){
- int cnt;
+ size_t cnt;
size_t slots;
p= getInstrPtr(mb,i);
- cnt = p->argc;
- slots = p->argc + i;
+ slots = 2 * p->argc;
block |= p->barrier != 0;
list[i]= (Node) GDKzalloc(sizeof(NodeRecord) + sizeof(int) *
slots);
if (list[i] == NULL){
@@ -116,12 +115,16 @@
GDKfree(var);
return 0;
}
- list[i]->cnt= p->argc;
+ cnt = p->argc;
if ( sqlRef == getModuleId(p) && isUpdateInstruction(p)) {
int storage_read;
for ( storage_read = 0; i > storage_read;
storage_read++) {
InstrPtr reading = getInstrPtr(mb,storage_read);
if ( sqlRef == getModuleId(reading) && bindRef
== getFunctionId(reading)) {
+ if ( cnt == slots){
+ list[i]=
GDKrealloc(list[i],sizeof(NodeRecord) + sizeof(int) * (slots + 8));
+ slots += 8;
+ }
list[i]->stmt[cnt++] = storage_read;
}
}
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list