From 157d40466b116edff151d5fb2bd3ccee70a3f7f5 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Wed, 25 May 2022 14:36:27 +0200 Subject: [PATCH] mark_space_reacquire_memory updates pending_unavailable_bytes --- whippet.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/whippet.h b/whippet.h index f365bd60f..f62e81c3b 100644 --- a/whippet.h +++ b/whippet.h @@ -494,7 +494,8 @@ static void mark_space_reacquire_memory(struct mark_space *space, uintptr_t block = pop_unavailable_block(space); ASSERT(block); push_empty_block(space, block); - pending += BLOCK_SIZE; + pending = atomic_fetch_add(&space->pending_unavailable_bytes, BLOCK_SIZE) + + BLOCK_SIZE; } }