core/memory: Pooled memory implementation (#1085)

This commit is contained in:
Daniel R. 2024-09-29 09:28:41 +02:00 committed by GitHub
parent 5e98a3e1d8
commit 80bf46da4c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 301 additions and 11 deletions

View file

@ -28,4 +28,16 @@ template <typename T>
return (value & 0x3FFF) == 0;
}
template <typename T>
requires std::is_integral_v<T>
[[nodiscard]] constexpr bool Is64KBAligned(T value) {
return (value & 0xFFFF) == 0;
}
template <typename T>
requires std::is_integral_v<T>
[[nodiscard]] constexpr bool Is2MBAligned(T value) {
return (value & 0x1FFFFF) == 0;
}
} // namespace Common