From dcfdc547f6d548e5a302d6a725cc3ceca894c954 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Mon, 16 Sep 2024 11:45:01 +0200 Subject: [PATCH] Whoops, fix refactor-induced locking problem --- src/adaptive-heap-sizer.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/adaptive-heap-sizer.h b/src/adaptive-heap-sizer.h index df38f181d..d2c7c8612 100644 --- a/src/adaptive-heap-sizer.h +++ b/src/adaptive-heap-sizer.h @@ -90,6 +90,7 @@ gc_adaptive_heap_sizer_on_gc(struct gc_adaptive_heap_sizer *sizer, static void gc_adaptive_heap_sizer_background_task(void *data) { struct gc_adaptive_heap_sizer *sizer = data; + pthread_mutex_lock(&sizer->lock); uint64_t bytes_allocated = sizer->get_allocation_counter(sizer->callback_data); uint64_t heartbeat = gc_platform_monotonic_nanoseconds();