mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:57:44 +00: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
Add a link
Reference in a new issue