Changeset: 4036a7e888a6 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/4036a7e888a6
Modified Files:
        gdk/gdk_storage.c
Branch: Dec2025
Log Message:

When allocating a heap for a msk bat, don't overallocate.


diffs (12 lines):

diff --git a/gdk/gdk_storage.c b/gdk/gdk_storage.c
--- a/gdk/gdk_storage.c
+++ b/gdk/gdk_storage.c
@@ -813,6 +813,8 @@ BATload_intern(bat bid, bool lock)
        if (b->ttype != TYPE_void) {
                b->theap->storage = b->theap->newstorage = STORE_INVALID;
                if ((b->batCount == 0 ?
+                    ATOMstorage(b->ttype) == TYPE_msk ?
+                    HEAPalloc(b->theap, (b->batCapacity + 31) / 32, 4) :
                     HEAPalloc(b->theap, b->batCapacity, b->twidth) :
                     HEAPload(b->theap, b->theap->filename, NULL, 
b->batRestricted == BAT_READ)) != GDK_SUCCEED) {
                        HEAPfree(b->theap, false);
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to