Add fast versions of tracy_malloc/tracy_free.

This commit is contained in:
Bartosz Taudul 2021-06-10 01:18:03 +02:00
parent c20721ca4f
commit 7889d33044
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -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