Merge pull request #1398 from Lectem/fix/concurrentqueue-and-malloc-define

WORKAROUND_malloc/free should properly route to tracy_malloc/free
This commit is contained in:
Bartosz Taudul
2026-06-10 17:57:32 +02:00
committed by GitHub

View File

@@ -171,8 +171,8 @@ struct ConcurrentQueueDefaultTraits
#if defined(malloc) || defined(free)
// Gah, this is 2015, stop defining macros that break standard code already!
// Work around malloc/free being special macros:
static inline void* WORKAROUND_malloc(size_t size) { return malloc(size); }
static inline void WORKAROUND_free(void* ptr) { return free(ptr); }
static inline void* WORKAROUND_malloc(size_t size) { return tracy::tracy_malloc(size); }
static inline void WORKAROUND_free(void* ptr) { return tracy::tracy_free(ptr); }
static inline void* (malloc)(size_t size) { return WORKAROUND_malloc(size); }
static inline void (free)(void* ptr) { return WORKAROUND_free(ptr); }
#else