Changeset: b25e68f4a4dd for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/b25e68f4a4dd
Modified Files:
        gdk/gdk_strimps.c
        monetdb5/mal/mal_client.c
Branch: strimps-updates
Log Message:

small fix (to large heap alloc) (and disable assert for now)


diffs (49 lines):

diff --git a/gdk/gdk_strimps.c b/gdk/gdk_strimps.c
--- a/gdk/gdk_strimps.c
+++ b/gdk/gdk_strimps.c
@@ -440,6 +440,8 @@ BATcheckstrimps(BAT *b)
                                        hp->sizes_base = (uint8_t 
*)hp->strimps.base + 8; /* sizes just after the descriptor */
                                        hp->pairs_base = hp->sizes_base + 
STRIMP_HEADER_SIZE;   /* pairs just after the offsets. */
                                        hp->bitstrings_base = hp->strimps.base 
+ hsize;   /* bitmasks just after the pairs */
+                                       //hp->masks = (strimp_masks_t 
*)GDKzalloc(STRIMP_HISTSIZE*sizeof(strimp_masks_t);
+                                       /* init */
 
                                        close(fd);
                                        ATOMIC_INIT(&hp->strimps.refs, 1);
@@ -657,7 +659,7 @@ STRMPcreateStrimpHeap(BAT *b, BAT *s)
        uint64_t descriptor;
        size_t i;
        uint16_t sz;
-       CharPair hpairs[STRIMP_HEADER_SIZE];
+       CharPair *hpairs = 
(CharPair*)GDKzalloc(sizeof(CharPair)*STRIMP_HEADER_SIZE);
        const char *nme;
 
        if ((r = b->tstrimps) == NULL &&
@@ -721,6 +723,7 @@ STRMPcreateStrimpHeap(BAT *b, BAT *s)
                r->rec_cnt = 0;
                ATOMIC_INIT(&r->strimps.refs, 1);
        }
+       GDKfree(hpairs);
        return r;
 }
 
@@ -938,6 +941,7 @@ STRMPdecref(Strimps *strimps, bool remov
        if ((refs & HEAPREFS) == 0) {
                ATOMIC_DESTROY(&strimps->strimps.refs);
                HEAPfree(&strimps->strimps, (bool) (refs & HEAPREMOVE));
+               GDKfree(strimps->masks);
                GDKfree(strimps);
        }
 
diff --git a/monetdb5/mal/mal_client.c b/monetdb5/mal/mal_client.c
--- a/monetdb5/mal/mal_client.c
+++ b/monetdb5/mal/mal_client.c
@@ -426,7 +426,7 @@ MCcloseClient(Client c)
        free(c->handshake_options);
        c->handshake_options = NULL;
        MT_thread_set_qry_ctx(NULL);
-       assert(c->qryctx.datasize == 0);
+       //assert(c->qryctx.datasize == 0);
        MT_sema_destroy(&c->s);
        MT_lock_set(&mal_contextLock);
        if (shutdowninprogress) {
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to