Changeset: 01ae46c3004d for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/01ae46c3004d
Modified Files:
        gdk/gdk.h
Branch: Jul2021
Log Message:

Finish backport started in changeset b4377f09aa0f.


diffs (17 lines):

diff --git a/gdk/gdk.h b/gdk/gdk.h
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -998,7 +998,12 @@ bat_iterator_nolock(BAT *b)
                        .shift = b->tshift,
                        .type = b->ttype,
                        .tseq = b->tseqbase,
-                       .hfree = b->theap->free,
+                       /* don't use b->theap->free in case b is a slice */
+                       .hfree = b->ttype ?
+                                 b->ttype == TYPE_msk ?
+                                  (((size_t) b->batCount + 31) / 32) * 4 :
+                                 (size_t) b->batCount << b->tshift :
+                                0,
                        .vhfree = b->tvheap ? b->tvheap->free : 0,
 #ifndef NDEBUG
                        .locked = false,
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to