summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Heap/Heap.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-06-27 22:39:48 +0200
committerAndreas Kling <kling@serenityos.org>2021-06-27 22:40:49 +0200
commitcd53d046b25f7a38b2bf0cf9e38db3762ca79819 (patch)
tree6098c7e27e18556e26d0e1adbb9525aa73c1b09e /Userland/Libraries/LibJS/Heap/Heap.cpp
parent1bd52ce7896889f24c5972408c6b29b3d5ebde1d (diff)
downloadserenity-cd53d046b25f7a38b2bf0cf9e38db3762ca79819.zip
LibJS: Fix typo "sweeped" => "swept" everywhere
Diffstat (limited to 'Userland/Libraries/LibJS/Heap/Heap.cpp')
-rw-r--r--Userland/Libraries/LibJS/Heap/Heap.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Userland/Libraries/LibJS/Heap/Heap.cpp b/Userland/Libraries/LibJS/Heap/Heap.cpp
index 8b807ff606..c1ee023ecb 100644
--- a/Userland/Libraries/LibJS/Heap/Heap.cpp
+++ b/Userland/Libraries/LibJS/Heap/Heap.cpp
@@ -183,22 +183,22 @@ void Heap::sweep_dead_cells(bool print_report, const Core::ElapsedTimer& measure
dbgln_if(HEAP_DEBUG, "sweep_dead_cells:");
Vector<HeapBlock*, 32> empty_blocks;
Vector<HeapBlock*, 32> full_blocks_that_became_usable;
- Vector<Cell*> sweeped_cells;
+ Vector<Cell*> swept_cells;
size_t collected_cells = 0;
size_t live_cells = 0;
size_t collected_cell_bytes = 0;
size_t live_cell_bytes = 0;
- auto should_store_sweeped_cells = !m_weak_containers.is_empty();
+ auto should_store_swept_cells = !m_weak_containers.is_empty();
for_each_block([&](auto& block) {
bool block_has_live_cells = false;
bool block_was_full = block.is_full();
block.template for_each_cell_in_state<Cell::State::Live>([&](Cell* cell) {
if (!cell->is_marked()) {
dbgln_if(HEAP_DEBUG, " ~ {}", cell);
- if (should_store_sweeped_cells)
- sweeped_cells.append(cell);
+ if (should_store_swept_cells)
+ swept_cells.append(cell);
block.deallocate(cell);
++collected_cells;
collected_cell_bytes += block.cell_size();
@@ -227,7 +227,7 @@ void Heap::sweep_dead_cells(bool print_report, const Core::ElapsedTimer& measure
}
for (auto* weak_container : m_weak_containers)
- weak_container->remove_sweeped_cells({}, sweeped_cells);
+ weak_container->remove_swept_cells({}, swept_cells);
if constexpr (HEAP_DEBUG) {
for_each_block([&](auto& block) {