Implement Heap::reset()
Some checks failed
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, clang, clang++, macos-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Has been cancelled

This commit is contained in:
2026-09-27 22:17:59 -07:00
parent 07bb4a4628
commit 49c4ae482e
2 changed files with 22 additions and 12 deletions

View File

@@ -60,6 +60,9 @@ public:
// Free the allocation at `address`
void free(std::byte* address);
// Reset the heap, freeing all memory and potentially releasing comitted pages.
void reset();
// Get the actual used size.
// This may differ from the sum of allocations due to alignment requirements.
size_t getUsed() const;