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

Fix rpmalloc initializing problem in android

This commit is contained in:
King19931229 2021-05-14 18:48:02 +08:00
parent bb25687f7e
commit d7bfb30079
2 changed files with 6 additions and 0 deletions

View File

@ -163,6 +163,7 @@ void InitCallstack()
TRACY_API uintptr_t* CallTrace( int depth )
{
InitRPMallocThread();
auto trace = (uintptr_t*)tracy_malloc( ( 1 + depth ) * sizeof( uintptr_t ) );
const auto num = RtlWalkFrameChain( (void**)( trace + 1 ), depth, 0 );
*trace = num;

View File

@ -21,6 +21,7 @@
namespace tracy
{
TRACY_API void InitRPMallocThread();
struct CallstackSymbolData
{
@ -83,6 +84,8 @@ static _Unwind_Reason_Code tracy_unwind_callback( struct _Unwind_Context* ctx, v
static tracy_force_inline void* Callstack( int depth )
{
InitRPMallocThread();
assert( depth >= 1 && depth < 63 );
auto trace = (uintptr_t*)tracy_malloc( ( 1 + depth ) * sizeof( uintptr_t ) );
@ -98,6 +101,8 @@ static tracy_force_inline void* Callstack( int depth )
static tracy_force_inline void* Callstack( int depth )
{
InitRPMallocThread();
assert( depth >= 1 );
auto trace = (uintptr_t*)tracy_malloc( ( 1 + (size_t)depth ) * sizeof( uintptr_t ) );