Changeset: 63be47bc8bef for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=63be47bc8bef
Modified Files:
        monetdb5/modules/mal/bitcandidates.c
Branch: compressedcandidates
Log Message:

Properly initialize the bitvector


diffs (21 lines):

diff --git a/monetdb5/modules/mal/bitcandidates.c 
b/monetdb5/modules/mal/bitcandidates.c
--- a/monetdb5/modules/mal/bitcandidates.c
+++ b/monetdb5/modules/mal/bitcandidates.c
@@ -36,7 +36,7 @@ BCLcompress(Client cntxt, MalBlkPtr mb, 
 
        first = *(p);
        last = *(q-1);
-       comp = (last-first)/sizeof(msk) + 2; // at least 2 oids to avoid 
trivial properties set by BBPkeepref
+       comp = (last-first)/sizeof(msk) + 2 * sizeof(oid); // at least 2 oids 
to avoid trivial properties set by BBPkeepref
 #ifdef _DEBUG_BITCANDIDATES_
        fprintf(stderr,"# BLCcompress base "BUNFMT" first "BUNFMT" range " 
BUNFMT" count "BUNFMT" vector " BUNFMT"\n", b->tseqbase, first, last, 
BATcount(b), comp);
 #endif
@@ -46,7 +46,7 @@ BCLcompress(Client cntxt, MalBlkPtr mb, 
                throw(MAL,"compress",MAL_MALLOC_FAIL);
        /* zap the bitvector */
        o = (char *) Tloc(bn,0);
-       memset(o, 0, sizeof(oid) * comp);
+       memset(o, 0, comp);
        for( ; p < q; p++){
                setbit(o, (*p - first));
 #ifdef _DEBUG_BITCANDIDATES_
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to