Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wolfpld/tracy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorBartosz Taudul <wolf.pld@gmail.com>2021-06-10 02:18:03 +0300
committerBartosz Taudul <wolf.pld@gmail.com>2021-06-10 02:18:03 +0300
commit7889d330447077f836561f69368c6c711069473f (patch)
tree3247cb926bf9b5ce8f91f8fd4060813986006957 /common
parentc20721ca4fc3484b3c9aea2120336410028f24cf (diff)
Add fast versions of tracy_malloc/tracy_free.
Diffstat (limited to 'common')
-rw-r--r--common/TracyAlloc.hpp18
1 files changed, 18 insertions, 0 deletions
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