Changeset: e1e61e3d09b4 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e1e61e3d09b4
Modified Files:
MonetDB5/src/mal/mal_interpreter.mx
Branch: Oct2010
Log Message:
(re)alloc correct sizes (fixes problems with large mal programs and df)
diffs (30 lines):
diff -r 1161f24990d1 -r e1e61e3d09b4 MonetDB5/src/mal/mal_interpreter.mx
--- a/MonetDB5/src/mal/mal_interpreter.mx Sun Nov 28 12:24:04 2010 +0100
+++ b/MonetDB5/src/mal/mal_interpreter.mx Tue Nov 30 06:24:01 2010 +0100
@@ -867,7 +867,7 @@
return NULL;
q->size = ((sz<<1)>>1); /* we want a multiple of 2 */
q->last = 0;
- q->data = (void*)GDKmalloc(sizeof(void*)*sz);
+ q->data = (void*)GDKmalloc(sizeof(void*)*q->sz);
if ( q->data == NULL){
GDKfree(q);
return NULL;
@@ -895,7 +895,7 @@
if (q->last == q->size) {
/* enlarge buffer */
q->size <<= 1;
- q->data = GDKrealloc(q->data, q->size);
+ q->data = GDKrealloc(q->data, sizeof(void)*q->size);
}
q->data[q->last++] = d;
MT_unset_lock(q->l, "q_enqueue");
@@ -910,7 +910,7 @@
if (q->last == q->size) {
/* enlarge buffer */
q->size <<= 1;
- q->data = GDKrealloc(q->data, q->size);
+ q->data = GDKrealloc(q->data, sizeof(void)*q->size);
}
for ( i=q->last; i > 0; i--)
q->data[i]= q->data[i-1];
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list