1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Keep track of rpmalloc thread shutdown state.

This commit is contained in:
Bartosz Taudul
2022-02-14 17:52:33 +01:00
parent 72ae4d2ee4
commit 20680fa6a3
2 changed files with 5 additions and 0 deletions
+3
View File
@@ -1638,11 +1638,14 @@ _memory_adjust_size_class(size_t iclass) {
}
}
extern thread_local bool RpThreadShutdown;
static void
_memory_heap_finalize(void* heapptr) {
heap_t* heap = (heap_t*)heapptr;
if (!heap)
return;
RpThreadShutdown = true;
//Release thread cache spans back to global cache
#if ENABLE_THREAD_CACHE
_memory_heap_cache_adopt_deferred(heap);