Commit 4b2c3ef0 authored by Michael Lippautz's avatar Michael Lippautz Committed by V8 LUCI CQ

heap: Fix AllocationTrackerForDebugging

Initialize thread-safe count properly.

Bug: v8:12620
Change-Id: Ifb43a860f1b8cefd410fea25ac408f5be55ab1af
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3455823
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79046}
parent 6436e348
......@@ -811,7 +811,7 @@ class Heap::AllocationTrackerForDebugging final
// Count of all allocations performed through C++ bottlenecks. This needs to
// be atomic as objects are moved in parallel in the GC which counts as
// allocations.
std::atomic<size_t> allocations_count_;
std::atomic<size_t> allocations_count_{0};
// Running hash over allocations performed.
uint32_t raw_allocations_hash_ = 0;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment