Changeset: 64fe70b65819 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=64fe70b65819
Modified Files:
MonetDB5/src/mal/mal_instruction.mx
Branch: Oct2010
Log Message:
When we need to alloc a big array of integers the memset was crashing.
This error was detected in the Data Cyclotron plans, i.e., plans with 500k
lines of MAL.
To alloc space lets use the MonetDB functions, GDKmalloc, and GDKfree.
If we use GDKmalloc the crashe is gone.
To avoid leaks we free the vars structure before leaving the function.
diffs (21 lines):
diff -r 4566f2752fda -r 64fe70b65819 MonetDB5/src/mal/mal_instruction.mx
--- a/MonetDB5/src/mal/mal_instruction.mx Mon Sep 06 10:12:33 2010 +0200
+++ b/MonetDB5/src/mal/mal_instruction.mx Mon Sep 06 13:51:32 2010 +0200
@@ -1659,7 +1659,7 @@
InstrPtr q;
int actions;
- vars= (int *) alloca(mb->vtop * sizeof(int));
+ vars= (int *) GDKmalloc(mb->vtop * sizeof(int));
memset((char*) vars, 0, mb->vtop * sizeof(int));
/* build the alias table */
@@ -1714,6 +1714,8 @@
mnstr_printf(GDKout, "After reduction \n");
printFunction(GDKout,mb,0,0);
#endif
+ if (vars)
+ GDKfree(vars);
mb->vtop = cnt;
}
void
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list