Kernel: Zero initialize SlabAllocator member variables

PVS-Studio flagged these as uninitialized. While there is no bug here,
it is our policy to always initialize members to avoid potential bugs
in the future.
This commit is contained in:
Brian Gianforcaro 2021-09-11 09:51:43 -07:00 committed by Andreas Kling
parent 27a124f7d8
commit d158f2ed89
Notes: sideshowbarker 2024-07-18 04:08:29 +09:00

View file

@ -97,8 +97,8 @@ private:
};
Atomic<FreeSlab*> m_freelist { nullptr };
Atomic<size_t, AK::MemoryOrder::memory_order_relaxed> m_num_allocated;
size_t m_slab_count;
Atomic<size_t, AK::MemoryOrder::memory_order_relaxed> m_num_allocated { 0 };
size_t m_slab_count { 0 };
void* m_base { nullptr };
void* m_end { nullptr };