1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Move TracyAlloc.hpp to common. Use rpmalloc only if TRACY_ENABLE.

This commit is contained in:
Bartosz Taudul
2017-10-18 19:08:19 +02:00
parent c5ea9c744c
commit fc94378e0c
5 changed files with 14 additions and 5 deletions
+31
View File
@@ -0,0 +1,31 @@
#ifndef __TRACYALLOC_HPP__
#define __TRACYALLOC_HPP__
#ifdef TRACY_ENABLE
# include "../client/tracy_rpmalloc.hpp"
#endif
namespace tracy
{
static inline void* tracy_malloc( size_t size )
{
#ifdef TRACY_ENABLE
return rpmalloc( size );
#else
return malloc( size );
#endif
}
static inline void tracy_free( void* ptr )
{
#ifdef TRACY_ENABLE
rpfree( ptr );
#else
free( ptr );
#endif
}
}
#endif