Skip to content

Commit 4111da1

Browse files
ckennellycopybara-github
authored andcommitted
Check for progress from Span::FreelistPopBatch.
PiperOrigin-RevId: 821921129 Change-Id: Ib1f616aae24cd9713b7251c9c7e39ea00062fded
1 parent a9f51aa commit 4111da1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tcmalloc/central_freelist.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,8 @@ inline int CentralFreeList<Forwarder>::RemoveRange(absl::Span<void*> batch) {
545545
const uint8_t prev_bitwidth = absl::bit_width(prev_allocated);
546546
const uint8_t prev_index = span->nonempty_index();
547547
int here = span->FreelistPopBatch(batch.subspan(result), object_size);
548-
TC_ASSERT_GT(here, 0);
548+
// TODO(b/451807659): Return this to an assert after debugging is done.
549+
TC_CHECK_GT(here, 0, "Failed to make progress. Freelist corrupted?");
549550
// As the objects are being popped from the span, its utilization might
550551
// change. So, we remove the stale utilization from the histogram here and
551552
// add it again once we pop the objects.

0 commit comments

Comments
 (0)