From 7889d330447077f836561f69368c6c711069473f Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Thu, 10 Jun 2021 01:18:03 +0200 Subject: Add fast versions of tracy_malloc/tracy_free. --- common/TracyAlloc.hpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'common') diff --git a/common/TracyAlloc.hpp b/common/TracyAlloc.hpp index 27861c97..6f9c9d7f 100644 --- a/common/TracyAlloc.hpp +++ b/common/TracyAlloc.hpp @@ -32,6 +32,15 @@ static inline void* tracy_malloc( size_t size ) #endif } +static inline void* tracy_malloc_fast( size_t size ) +{ +#ifdef TRACY_ENABLE + return rpmalloc( size ); +#else + return malloc( size ); +#endif +} + static inline void tracy_free( void* ptr ) { #ifdef TRACY_ENABLE @@ -42,6 +51,15 @@ static inline void tracy_free( void* ptr ) #endif } +static inline void tracy_free_fast( void* ptr ) +{ +#ifdef TRACY_ENABLE + rpfree( ptr ); +#else + free( ptr ); +#endif +} + static inline void* tracy_realloc( void* ptr, size_t size ) { #ifdef TRACY_ENABLE -- cgit v1.2.3