mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-23 06:44:35 +00:00
Merge pull request #27 from mcleary/prevent-crash-when-exiting
Fix crash when running Tracy from DLLs
This commit is contained in:
commit
41972f62a3
@ -1468,6 +1468,7 @@ _memory_deallocate_large(span_t* span) {
|
|||||||
//Investigate if it is better to defer large spans as well through span_cache_deferred,
|
//Investigate if it is better to defer large spans as well through span_cache_deferred,
|
||||||
//possibly with some heuristics to pick either scheme at runtime per deallocation
|
//possibly with some heuristics to pick either scheme at runtime per deallocation
|
||||||
heap_t* heap = get_thread_heap();
|
heap_t* heap = get_thread_heap();
|
||||||
|
if (!heap) return;
|
||||||
#if ENABLE_ADAPTIVE_THREAD_CACHE || ENABLE_STATISTICS
|
#if ENABLE_ADAPTIVE_THREAD_CACHE || ENABLE_STATISTICS
|
||||||
size_t idx = span->span_count - 1;
|
size_t idx = span->span_count - 1;
|
||||||
atomic_decr32(&span->heap->span_use[idx].current);
|
atomic_decr32(&span->heap->span_use[idx].current);
|
||||||
|
Loading…
Reference in New Issue
Block a user