wingo pushed a commit to branch wip-whippet
in repository guile.

commit 157d40466b116edff151d5fb2bd3ccee70a3f7f5
Author: Andy Wingo <wi...@igalia.com>
AuthorDate: Wed May 25 14:36:27 2022 +0200

    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;
   }
 }
 

Reply via email to