Changeset: ddd7eca55077 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/ddd7eca55077
Modified Files:
gdk/gdk_bbp.c
gdk/gdk_string.c
Branch: Jan2022
Log Message:
Merge with Jul2021 branch.
diffs (31 lines):
diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c
--- a/gdk/gdk_bbp.c
+++ b/gdk/gdk_bbp.c
@@ -561,7 +561,8 @@ vheapinit(BAT *b, const char *buf, bat b
TRC_CRITICAL(GDK, "cannot allocate memory for heap.");
return -1;
}
- if (ATOMstorage(b->ttype) == TYPE_str &&
+ if (b->ttype >= 0 &&
+ ATOMstorage(b->ttype) == TYPE_str &&
free < GDK_STRHASHTABLE * sizeof(stridx_t) + BATTINY *
GDK_VARALIGN)
size = GDK_STRHASHTABLE * sizeof(stridx_t) + BATTINY *
GDK_VARALIGN;
else if (free < 512)
diff --git a/gdk/gdk_string.c b/gdk/gdk_string.c
--- a/gdk/gdk_string.c
+++ b/gdk/gdk_string.c
@@ -86,6 +86,14 @@ strCleanHash(Heap *h, bool rebuild)
(void) rebuild;
if (!h->cleanhash)
return;
+ if (h->size < GDK_STRHASHTABLE * sizeof(stridx_t) &&
+ HEAPextend(h, GDK_STRHASHTABLE * sizeof(stridx_t) + BATTINY *
GDK_VARALIGN, true) != GDK_SUCCEED) {
+ GDKclrerr();
+ if (h->size > 0)
+ memset(h->base, 0, h->size);
+ return;
+ }
+
/* rebuild hash table for double elimination
*
* If appending strings to the BAT was aborted, if the heap
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]