VR-Vantage 3.0 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TracyAlloc.hpp
Go to the documentation of this file.
1 #ifndef __TRACYALLOC_HPP__
2 #define __TRACYALLOC_HPP__
3 
4 #include <stdlib.h>
5 
6 #ifdef TRACY_ENABLE
7 # include "../client/tracy_rpmalloc.hpp"
8 #endif
9 
10 namespace tracy
11 {
12 
13 static inline void* tracy_malloc( size_t size )
14 {
15 #ifdef TRACY_ENABLE
16  return rpmalloc( size );
17 #else
18  return malloc( size );
19 #endif
20 }
21 
22 static inline void tracy_free( void* ptr )
23 {
24 #ifdef TRACY_ENABLE
25  rpfree( ptr );
26 #else
27  free( ptr );
28 #endif
29 }
30 
31 static inline void* tracy_realloc( void* ptr, size_t size )
32 {
33 #ifdef TRACY_ENABLE
34  return rprealloc( ptr, size );
35 #else
36  return realloc( ptr, size );
37 #endif
38 }
39 
40 }
41 
42 #endif


Copyright © 2005-2022 MAK Technologies. All Rights Reserved (www.mak.com)