summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-08-29 20:54:50 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-08-29 20:54:50 +0200
commit10e0e13bf326fd1c2f73771267b9de6b701aa6cb (patch)
tree7f0e3956af4f045b581f9718ee9a52127d604bd0 /Kernel
parent21ee24b9955467c6dcdd1c95d6f8f555058f127f (diff)
downloadserenity-10e0e13bf326fd1c2f73771267b9de6b701aa6cb.zip
Kernel: Add LogStream operator<< for Range
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/VM/RangeAllocator.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/Kernel/VM/RangeAllocator.h b/Kernel/VM/RangeAllocator.h
index 371f2035d9..b9e9b22eea 100644
--- a/Kernel/VM/RangeAllocator.h
+++ b/Kernel/VM/RangeAllocator.h
@@ -1,5 +1,6 @@
#pragma once
+#include <AK/AKString.h>
#include <AK/Vector.h>
#include <Kernel/VM/VirtualAddress.h>
@@ -61,3 +62,8 @@ private:
Vector<Range> m_available_ranges;
};
+
+inline const LogStream& operator<<(const LogStream& stream, const Range& value)
+{
+ return stream << String::format("Range(%x-%x)", value.base().get(), value.end().get() - 1);
+}