mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Always use init once to initialize rpmalloc.
This commit is contained in:
parent
9a5104dacf
commit
8d5f4d7363
@ -104,7 +104,6 @@ extern "C" typedef BOOL (WINAPI *t_GetLogicalProcessorInformationEx)( LOGICAL_PR
|
||||
namespace tracy
|
||||
{
|
||||
|
||||
#ifndef TRACY_DELAYED_INIT
|
||||
namespace
|
||||
{
|
||||
# if ( defined _WIN32 || defined __CYGWIN__ ) && _WIN32_WINNT >= _WIN32_WINNT_VISTA
|
||||
@ -144,6 +143,8 @@ struct RPMallocInit
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef TRACY_DELAYED_INIT
|
||||
|
||||
struct InitTimeWrapper
|
||||
{
|
||||
int64_t val;
|
||||
@ -867,12 +868,11 @@ static Thread* s_sysTraceThread = nullptr;
|
||||
#ifdef TRACY_DELAYED_INIT
|
||||
struct ThreadNameData;
|
||||
TRACY_API moodycamel::ConcurrentQueue<QueueItem>& GetQueue();
|
||||
|
||||
struct RPMallocInit { RPMallocInit() { rpmalloc_initialize(); } };
|
||||
|
||||
TRACY_API void InitRPMallocThread()
|
||||
|
||||
void InitRPMallocThread()
|
||||
{
|
||||
rpmalloc_initialize();
|
||||
RPMallocInit rpinit;
|
||||
rpmalloc_thread_initialize();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user