summaryrefslogtreecommitdiff
path: root/Kernel/Heap
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-05-17 18:29:47 +0200
committerAndreas Kling <kling@serenityos.org>2021-05-17 18:29:47 +0200
commitbebbeda7262d9139ac249387672e567fe3d3791f (patch)
treede25bb29fb8d231c4459a5ab8ba177536636410d /Kernel/Heap
parentc1e292e5bcaac0072ccd66158f6d05ce0fa5ba35 (diff)
downloadserenity-bebbeda7262d9139ac249387672e567fe3d3791f.zip
Revert "BitmapView: Disable mutations of the underlying Bitmap"
This reverts commit f25209113fcd15df5778938c4accf13c5139d278.
Diffstat (limited to 'Kernel/Heap')
-rw-r--r--Kernel/Heap/Heap.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/Kernel/Heap/Heap.h b/Kernel/Heap/Heap.h
index c75cebac59..ef87e10ca7 100644
--- a/Kernel/Heap/Heap.h
+++ b/Kernel/Heap/Heap.h
@@ -6,7 +6,7 @@
#pragma once
-#include <AK/Bitmap.h>
+#include <AK/BitmapView.h>
#include <AK/ScopeGuard.h>
#include <AK/TemporaryChange.h>
#include <AK/Vector.h>
@@ -32,7 +32,7 @@ public:
Heap(u8* memory, size_t memory_size)
: m_total_chunks(calculate_chunks(memory_size))
, m_chunks(memory)
- , m_bitmap(m_total_chunks, false)
+ , m_bitmap(memory + m_total_chunks * CHUNK_SIZE, m_total_chunks)
{
// To keep the alignment of the memory passed in, place the bitmap
// at the end of the memory block.
@@ -153,7 +153,7 @@ private:
size_t m_total_chunks { 0 };
size_t m_allocated_chunks { 0 };
u8* m_chunks { nullptr };
- Bitmap m_bitmap;
+ BitmapView m_bitmap;
};
template<typename ExpandHeap>