mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Add fast versions of tracy_malloc/tracy_free.
This commit is contained in:
parent
c20721ca4f
commit
7889d33044
@ -32,6 +32,15 @@ static inline void* tracy_malloc( size_t size )
|
|||||||
#endif
|
#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 )
|
static inline void tracy_free( void* ptr )
|
||||||
{
|
{
|
||||||
#ifdef TRACY_ENABLE
|
#ifdef TRACY_ENABLE
|
||||||
@ -42,6 +51,15 @@ static inline void tracy_free( void* ptr )
|
|||||||
#endif
|
#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 )
|
static inline void* tracy_realloc( void* ptr, size_t size )
|
||||||
{
|
{
|
||||||
#ifdef TRACY_ENABLE
|
#ifdef TRACY_ENABLE
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user