Changeset: c41f711c3368 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/c41f711c3368
Modified Files:
monetdb5/modules/mal/mat.c
Branch: Sep2022
Log Message:
Do not extend a heap that is likely to be freed soon without having been used.
diffs (15 lines):
diff --git a/monetdb5/modules/mal/mat.c b/monetdb5/modules/mal/mat.c
--- a/monetdb5/modules/mal/mat.c
+++ b/monetdb5/modules/mal/mat.c
@@ -141,8 +141,9 @@ MATpackIncrement(Client cntxt, MalBlkPtr
throw(MAL, "mat.pack", SQLSTATE(HY013) MAL_MALLOC_FAIL);
}
/* allocate enough space for the vheap, but not for strings,
- * since BATappend does clever things for strings */
- if ( b->tvheap && bn->tvheap && ATOMstorage(b->ttype) !=
TYPE_str){
+ * since BATappend does clever things for strings, and not for
+ * vheap views since they may well get shared */
+ if (b->tvheap && b->tvheap->parentid == b->batCacheid &&
bn->tvheap && ATOMstorage(b->ttype) != TYPE_str){
newsize = b->tvheap->size * pieces;
if (HEAPextend(bn->tvheap, newsize, true) !=
GDK_SUCCEED) {
BBPunfix(b->batCacheid);
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]