mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
rpmalloc may still be uninitialized here (i.e. if memory allocation/free is performed before any other tracy operation that would initialize thread_local data). Since memory allocations are using serialized queue (which is not held in thread_local section) and obtaining callstack involves memory allocation, we need to initialize rpmalloc manually. This won't be a problem when support for zone callbacks becomes online, because zones are stored in per-thread queues, which initialize thread_local data before rpmalloc is needed in the Callstack() call.