Changeset: 761b5b674a5e for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=761b5b674a5e
Modified Files:
gdk/gdk_project.c
Branch: unlock
Log Message:
Don't reclaim prematurely.
diffs (23 lines):
diff --git a/gdk/gdk_project.c b/gdk/gdk_project.c
--- a/gdk/gdk_project.c
+++ b/gdk/gdk_project.c
@@ -726,14 +726,16 @@ BATprojectchain(BAT **bats)
}
n++; /* undo for debug print */
}
- while (ndelete-- > 0)
- BBPreclaim(tobedeleted[ndelete]);
- GDKfree(tobedeleted);
BATsetcount(bn, ba[0].cnt);
bn->tsorted = (ba[0].cnt <= 1) | issorted;
bn->trevsorted = ba[0].cnt <= 1;
bn->tnonil = nonil & b->tnonil;
bn->tseqbase = oid_nil;
+ /* note, b may point to one of the bats in tobedeleted, so
+ * reclaim after the last use of b */
+ while (ndelete-- > 0)
+ BBPreclaim(tobedeleted[ndelete]);
+ GDKfree(tobedeleted);
GDKfree(ba);
TRC_DEBUG(ALGO, "with %d bats: " ALGOOPTBATFMT " " LLFMT " usec\n",
n, ALGOOPTBATPAR(bn), GDKusec() - t0);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list