Changeset: 55f9e028bb23 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=55f9e028bb23
Modified Files:
gdk/gdk_hash.c
gdk/gdk_imprints.c
Branch: default
Log Message:
Record bat owner in heap structure for hash and imprints.
There is currently no practical use of this, but the space is there,
so why not use it?
diffs (38 lines):
diff --git a/gdk/gdk_hash.c b/gdk/gdk_hash.c
--- a/gdk/gdk_hash.c
+++ b/gdk/gdk_hash.c
@@ -250,6 +250,7 @@ BATcheckhash(BAT *b)
h->Link = hp->base + HASH_HEADER_SIZE *
SIZEOF_SIZE_T;
h->Hash = (void *) ((char *) h->Link +
h->lim * h->width);
close(fd);
+ hp->parentid = b->batCacheid;
b->T->hash = h;
ALGODEBUG fprintf(stderr,
"#BATcheckhash: reusing persisted hash %s\n", BATgetId(b));
MT_lock_unset(&GDKhashLock(abs(b->batCacheid)));
@@ -490,6 +491,7 @@ BAThash(BAT *b, BUN masksize)
}
break;
}
+ hp->parentid = b->batCacheid;
#ifdef PERSISTENTHASH
if (BBP_status(b->batCacheid) & BBPEXISTING) {
MT_Id tid;
diff --git a/gdk/gdk_imprints.c b/gdk/gdk_imprints.c
--- a/gdk/gdk_imprints.c
+++ b/gdk/gdk_imprints.c
@@ -240,6 +240,7 @@ BATcheckimprints(BAT *b)
imprints->imps = (void *)
(imprints->stats + 64 * 3);
imprints->dict = (void *) ((uintptr_t)
((char *) imprints->imps + pages * (imprints->bits / 8) + sizeof(uint64_t)) &
~(sizeof(uint64_t) - 1));
close(fd);
+ imprints->imprints->parentid =
b->batCacheid;
b->T->imprints = imprints;
ALGODEBUG fprintf(stderr,
"#BATcheckimprints: reusing persisted imprints %d\n", b->batCacheid);
MT_lock_unset(&GDKimprintsLock(abs(b->batCacheid)));
@@ -486,6 +487,7 @@ BATimprints(BAT *b)
}
close(fd);
}
+ imprints->imprints->parentid = b->batCacheid;
b->T->imprints = imprints;
}
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list