Skip to content

Commit

Permalink
Merge pull request #4352 from Sonicadvance1/profiler_fix_zero
Browse files Browse the repository at this point in the history
Profiler: Fixes zeroing of allocated slots.
  • Loading branch information
lioncash authored Feb 13, 2025
2 parents da76023 + f25cdcd commit 54412f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Common/Profiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ FEXCore::Profiler::ThreadStats* StatAllocBase::AllocateSlot(uint32_t TID) {
--RemainingSlots;

// Slot might be reused, just zero it now.
memset(AllocatedSlot, 0, sizeof(FEXCore::Profiler::ThreadStatsHeader));
memset(AllocatedSlot, 0, sizeof(*AllocatedSlot));

// TID != 0 means slot is allocated.
AllocatedSlot->TID.store(TID, std::memory_order_relaxed);
Expand Down

0 comments on commit 54412f1

Please sign in to comment.