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

Harden against uninitialized rpmalloc.

Initialize rpmalloc either by explicitly calling InitRPMallocThread(),
or by forcing initialization of thread local variables block.
This commit is contained in:
Bartosz Taudul
2020-05-19 13:48:19 +02:00
parent dd4c2cf9fa
commit fad7e72fd4
4 changed files with 10 additions and 12 deletions
+1
View File
@@ -271,6 +271,7 @@ private:
static inline VkCtx* CreateVkContext( VkPhysicalDevice physdev, VkDevice device, VkQueue queue, VkCommandBuffer cmdbuf )
{
InitRPMallocThread();
auto ctx = (VkCtx*)tracy_malloc( sizeof( VkCtx ) );
new(ctx) VkCtx( physdev, device, queue, cmdbuf );
return ctx;