haze: implement GetObjectPropList

This commit is contained in:
Liam
2023-10-13 20:59:36 -04:00
committed by SciresM
parent e8ac23e2ee
commit c866c15856
6 changed files with 149 additions and 3 deletions

View File

@@ -111,6 +111,14 @@ namespace haze {
}
constexpr void Deallocate(void *p, size_t n) {
/* Check for overflow in alignment. */
if (!util::CanAddWithoutOverflow(n, alignof(u64) - 1)) {
return;
}
/* Align the amount to satisfy allocation for u64. */
n = util::AlignUp(n, alignof(u64));
/* If the pointer was the last allocation, return the memory to the heap. */
if (static_cast<u8 *>(p) + n == this->GetNextAddress()) {
m_next_address = this->GetNextAddress() - n;