mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-27 00:04:35 +00:00
Move TracyAlloc.hpp to common. Use rpmalloc only if TRACY_ENABLE.
This commit is contained in:
parent
c5ea9c744c
commit
fc94378e0c
@ -22,7 +22,6 @@
|
|||||||
#include "../common/TracySocket.hpp"
|
#include "../common/TracySocket.hpp"
|
||||||
#include "../common/TracySystem.hpp"
|
#include "../common/TracySystem.hpp"
|
||||||
#include "tracy_rpmalloc.hpp"
|
#include "tracy_rpmalloc.hpp"
|
||||||
#include "TracyAlloc.hpp"
|
|
||||||
#include "TracyScoped.hpp"
|
#include "TracyScoped.hpp"
|
||||||
#include "TracyProfiler.hpp"
|
#include "TracyProfiler.hpp"
|
||||||
#include "TracyThread.hpp"
|
#include "TracyThread.hpp"
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
#include "concurrentqueue.h"
|
#include "concurrentqueue.h"
|
||||||
#include "../common/tracy_lz4.hpp"
|
#include "../common/tracy_lz4.hpp"
|
||||||
#include "../common/TracyQueue.hpp"
|
#include "../common/TracyQueue.hpp"
|
||||||
#include "TracyAlloc.hpp"
|
#include "../common/TracyAlloc.hpp"
|
||||||
|
|
||||||
#if defined _MSC_VER || defined __CYGWIN__
|
#if defined _MSC_VER || defined __CYGWIN__
|
||||||
# include <intrin.h>
|
# include <intrin.h>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "../common/TracySystem.hpp"
|
#include "../common/TracySystem.hpp"
|
||||||
#include "TracyAlloc.hpp"
|
#include "../common/TracyAlloc.hpp"
|
||||||
#include "TracyProfiler.hpp"
|
#include "TracyProfiler.hpp"
|
||||||
|
|
||||||
namespace tracy
|
namespace tracy
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
# define tracy_force_inline inline
|
# define tracy_force_inline inline
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "TracyAlloc.hpp"
|
#include "../common/TracyAlloc.hpp"
|
||||||
|
|
||||||
#if defined(__GNUC__)
|
#if defined(__GNUC__)
|
||||||
// Disable -Wconversion warnings (spuriously triggered when Traits::size_t and
|
// Disable -Wconversion warnings (spuriously triggered when Traits::size_t and
|
||||||
|
@ -1,19 +1,29 @@
|
|||||||
#ifndef __TRACYALLOC_HPP__
|
#ifndef __TRACYALLOC_HPP__
|
||||||
#define __TRACYALLOC_HPP__
|
#define __TRACYALLOC_HPP__
|
||||||
|
|
||||||
#include "tracy_rpmalloc.hpp"
|
#ifdef TRACY_ENABLE
|
||||||
|
# include "../client/tracy_rpmalloc.hpp"
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace tracy
|
namespace tracy
|
||||||
{
|
{
|
||||||
|
|
||||||
static inline void* tracy_malloc( size_t size )
|
static inline void* tracy_malloc( size_t size )
|
||||||
{
|
{
|
||||||
|
#ifdef TRACY_ENABLE
|
||||||
return rpmalloc( size );
|
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
|
||||||
rpfree( ptr );
|
rpfree( ptr );
|
||||||
|
#else
|
||||||
|
free( ptr );
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user