mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 02:12:09 -05:00
Kernel: Add formatter for Kernel::Range
This is very useful when debugging memory allocation in the kernel
This commit is contained in:
parent
f244a25f71
commit
ab196b484a
1 changed files with 8 additions and 0 deletions
|
@ -58,3 +58,11 @@ private:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
template<>
|
||||
struct AK::Formatter<Kernel::Range> : Formatter<FormatString> {
|
||||
void format(FormatBuilder& builder, Kernel::Range value)
|
||||
{
|
||||
return Formatter<FormatString>::format(builder, "{} - {} (size 0x{:08x})", value.base().as_ptr(), value.base().offset(value.size() - 1).as_ptr(), value.size());
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue