Changeset: ddbbf61ca978 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ddbbf61ca978
Modified Files:
monetdb5/modules/mal/mosaic.c
sql/backends/monet5/sql.c
Branch: mosaic
Log Message:
Use the actual storage needed
diffs (44 lines):
diff --git a/monetdb5/modules/mal/mosaic.c b/monetdb5/modules/mal/mosaic.c
--- a/monetdb5/modules/mal/mosaic.c
+++ b/monetdb5/modules/mal/mosaic.c
@@ -538,7 +538,7 @@ MOSdecompressInternal(Client cntxt, int
BBPreleaseref(bn->batCacheid);
throw(MAL, "mosaic.decompress", MAL_MALLOC_FAIL);
}
- MOSinit(task,b);;
+ MOSinit(task,b);
task->src = Tloc(bn, BUNfirst(bn));
task->timer = GDKusec();
while(task->blk){
@@ -579,6 +579,7 @@ MOSdecompressInternal(Client cntxt, int
BATseqbase(bn,b->hseqbase);
bn->hdense = 1;
bn->hkey = 1;
+ bn->T->heap.free = (lng) (task->dst- Tloc(bn,BUNfirst(bn)));
bn->T->nonil = b->T->nonil;
bn->T->nil = b->T->nil;
bn->T->seq = b->T->seq;
diff --git a/sql/backends/monet5/sql.c b/sql/backends/monet5/sql.c
--- a/sql/backends/monet5/sql.c
+++ b/sql/backends/monet5/sql.c
@@ -4625,17 +4625,13 @@ sql_storage(Client cntxt, MalBlkPtr mb,
w = (int) (sum / cnt2);
}
atom =
BUNappend(atom, &w, FALSE);
-
/*printf(" size "BUNFMT, tailsize(bn,BATcount(bn)) + (bn->T->vheap?
bn->T->vheap->size:0)); */
- sz =
tailsize(bn, BATcount(bn));
- sz +=
headsize(bn, BATcount(bn));
+ sz =
bn->T->heap.free;
size =
BUNappend(size, &sz, FALSE);
- sz =
bn->T->vheap ? bn->T->vheap->size : 0;
- sz +=
bn->H->vheap ? bn->H->vheap->size : 0;
+ sz =
bn->T->vheap ? bn->T->vheap->free : 0;
heap =
BUNappend(heap, &sz, FALSE);
- sz =
bn->T->hash ? bn->T->hash->heap->size : 0;
- sz +=
bn->H->hash ? bn->H->hash->heap->size : 0;
+ sz =
bn->T->hash ? bn->T->hash->heap->free : 0;
indices
= BUNappend(indices, &sz, FALSE);
sz =
IMPSimprintsize(bn);
imprints = BUNappend(imprints, &sz, FALSE);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list