Changeset: 235475354d64 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=235475354d64
Modified Files:
gdk/gdk_bbp.c
Branch: linear-hashing
Log Message:
Check that arrays sizes are big enough for maximum number of BATs.
diffs (19 lines):
diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c
--- a/gdk/gdk_bbp.c
+++ b/gdk/gdk_bbp.c
@@ -1415,6 +1415,15 @@ BBPinit(void)
unsigned bbpversion = 0;
int i;
+ /* the maximum number of BATs allowed in the system and the
+ * size of the "physical" array are linked in a complicated
+ * manner. The expression below shows the relationship */
+ static_assert((uint64_t) N_BBPINIT * BBPINIT < (UINT64_C(1) << (3 *
((sizeof(BBP[0][0].physical) + 2) * 2 / 5))), "\"physical\" array in BBPrec is
too small");
+ /* similarly, the maximum number of BATs allowed also has a
+ * (somewhat simpler) relation with the size of the "bak"
+ * array */
+ static_assert((uint64_t) N_BBPINIT * BBPINIT < (UINT64_C(1) << (3 *
(sizeof(BBP[0][0].bak) - 5))), "\"bak\" array in BBPrec is too small");
+
if (!GDKinmemory()) {
str bbpdirstr, backupbbpdirstr;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list