Changeset: 1172a4f1f60e for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1172a4f1f60e
Modified Files:
        monetdb5/modules/mal/mat.c
Branch: Feb2013
Log Message:

Create some slack in incremental mat.pack


diffs (15 lines):

diff --git a/monetdb5/modules/mal/mat.c b/monetdb5/modules/mal/mat.c
--- a/monetdb5/modules/mal/mat.c
+++ b/monetdb5/modules/mal/mat.c
@@ -151,9 +151,9 @@ MATpackIncrement(Client cntxt, MalBlkPtr
                throw(MAL, "mat.pack", RUNTIME_OBJECT_MISSING);
 
        if ( getArgType(mb,p,2) == TYPE_int){
-               /* first step */
+               /* first step, estimate with some slack */
                pieces = stk->stk[getArg(p,2)].val.ival;
-               bn = BATnew(TYPE_void, b->ttype, BATcount(b) * pieces);
+               bn = BATnew(TYPE_void, b->ttype, (BUN)(1.2 * BATcount(b) * 
pieces));
                if (bn == NULL)
                        throw(MAL, "mat.pack", MAL_MALLOC_FAIL);
                /* allocate enough space for the strings */
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to