Changeset: 2faef8fc5b28 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2faef8fc5b28
Modified Files:
MonetDB5/src/optimizer/opt_mapreduce.mx
Branch: default
Log Message:
use GDKmalloc/free
diffs (49 lines):
diff -r 88ca76eb17a7 -r 2faef8fc5b28 MonetDB5/src/optimizer/opt_mapreduce.mx
--- a/MonetDB5/src/optimizer/opt_mapreduce.mx Thu May 20 20:33:00 2010 +0200
+++ b/MonetDB5/src/optimizer/opt_mapreduce.mx Thu May 20 20:33:17 2010 +0200
@@ -348,9 +348,10 @@
if (stk->stack == NULL) {
stk->len = 10;
stk->cur = 0;
- stk->stack = malloc(sizeof(int) * stk->len);
+ stk->stack = GDKmalloc(sizeof(int) * stk->len);
} else if (stk->cur == stk->len) {
- stk->stack = realloc(stk->stack, sizeof(int) * stk->len * 2);
+ stk->len *= 2;
+ stk->stack = GDKrealloc(stk->stack, sizeof(int) * stk->len);
}
assert(stk->stack);
@@ -383,7 +384,7 @@
trackstack_destroy(struct stack *stk)
{
if (!trackstack_isempty(stk)) {
- free(stk->stack);
+ GDKfree(stk->stack);
stk->stack = NULL;
}
}
@@ -470,7 +471,6 @@
str schema = VALget(&getVar(mc,
getArg(p, 2))->value);
/* check if this is a column from a
mapreduce schema (mr_*) */
if (strncmp(schema, "mr_", 3) != 0) {
- freeSymbol(new);
GDKfree(mb->stmt);
mb->stmt = orig;
mb->stop = limit;
@@ -483,7 +483,6 @@
"%s", schema +
3);
} else {
if (strcmp(mrcluster, schema +
3) != 0) {
- freeSymbol(new);
GDKfree(mb->stmt);
mb->stmt = orig;
mb->stop = limit;
@@ -799,7 +798,6 @@
}
}
-
#if defined(_DEBUG_OPT_MAPREDUCE) && _DEBUG_OPT_MAPREDUCE == 10
stream_printf(cntxt->fdout, "MAP program\n");
chkProgram(cntxt->nspace, mc);
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list