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:
parent
bb25687f7e
commit
d7bfb30079
@ -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;
|
||||
|
||||
@ -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 ) );
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user