Changeset: 819bbfb751a6 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/819bbfb751a6 Modified Files: gdk/gdk_imprints.c monetdb5/mal/mal_resource.c Branch: Jul2021 Log Message:
Use the real size of index heaps, and take orderidx into account. diffs (28 lines): diff --git a/gdk/gdk_imprints.c b/gdk/gdk_imprints.c --- a/gdk/gdk_imprints.c +++ b/gdk/gdk_imprints.c @@ -720,8 +720,7 @@ IMPSimprintsize(BAT *b) { lng sz = 0; if (b->timprints && b->timprints != (Imprints *) 1) { - sz = b->timprints->impcnt * b->timprints->bits / 8; - sz += b->timprints->dictcnt * sizeof(cchdc_t); + sz = (lng) b->timprints->imprints.free; } return sz; } diff --git a/monetdb5/mal/mal_resource.c b/monetdb5/mal/mal_resource.c --- a/monetdb5/mal/mal_resource.c +++ b/monetdb5/mal/mal_resource.c @@ -81,7 +81,10 @@ getMemoryClaim(MalBlkPtr mb, MalStkPtr s t = IMPSimprintsize(b); if( t > itotal) itotal = t; - /* We should also consider the ordered index and mosaic */ + t = b->torderidx && b->torderidx != (Heap *) 1 ? (lng) b->torderidx->free : 0; + if( t > itotal) + itotal = t; + /* We should also consider the mosaic */ //total = total > (lng)(MEMORY_THRESHOLD ) ? (lng)(MEMORY_THRESHOLD ) : total; BBPunfix(b->batCacheid); if ( total < itotal) _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list