summaryrefslogtreecommitdiff
path: root/Kernel/Memory
diff options
context:
space:
mode:
authorBrian Gianforcaro <bgianf@serenityos.org>2021-12-22 01:26:35 -0800
committerBrian Gianforcaro <b.gianfo@gmail.com>2021-12-22 13:29:31 -0800
commitb8e210deea3d6bc75431587f5c7be75ed74ccac6 (patch)
tree978f77cf82ce3544549a3df2855e00035c14721c /Kernel/Memory
parent39e5b42f362c65befb14a42d6abfa078961e3cc8 (diff)
downloadserenity-b8e210deea3d6bc75431587f5c7be75ed74ccac6.zip
Kernel: Initialize PhysicalRegion::m_large_zones, remove m_small_zones
Found by PVS Studio Static Analysis.
Diffstat (limited to 'Kernel/Memory')
-rw-r--r--Kernel/Memory/PhysicalRegion.cpp2
-rw-r--r--Kernel/Memory/PhysicalRegion.h3
2 files changed, 2 insertions, 3 deletions
diff --git a/Kernel/Memory/PhysicalRegion.cpp b/Kernel/Memory/PhysicalRegion.cpp
index fb6794b2b0..b9089b37bf 100644
--- a/Kernel/Memory/PhysicalRegion.cpp
+++ b/Kernel/Memory/PhysicalRegion.cpp
@@ -63,7 +63,7 @@ void PhysicalRegion::initialize_zones()
m_large_zones = make_zones(large_zone_size);
// Then divide any remaining space into 1 MiB zones (with 256 pages each)
- m_small_zones = make_zones(small_zone_size);
+ make_zones(small_zone_size);
}
OwnPtr<PhysicalRegion> PhysicalRegion::try_take_pages_from_beginning(unsigned page_count)
diff --git a/Kernel/Memory/PhysicalRegion.h b/Kernel/Memory/PhysicalRegion.h
index 1148ae7ed4..2de2b2f3ae 100644
--- a/Kernel/Memory/PhysicalRegion.h
+++ b/Kernel/Memory/PhysicalRegion.h
@@ -46,8 +46,7 @@ private:
NonnullOwnPtrVector<PhysicalZone> m_zones;
- size_t m_large_zones;
- size_t m_small_zones;
+ size_t m_large_zones { 0 };
PhysicalZone::List m_usable_zones;
PhysicalZone::List m_full_zones;