Add a max_size member func to linearAlloc

This commit is contained in:
2025-11-26 11:18:48 +01:00
parent 9731579af9
commit 830524c9eb

View File

@@ -32,5 +32,9 @@ class linearAllocator {
friend bool operator!=(const linearAllocator, const linearAllocator) {
return false;
}
// Use linearSpace free as max_size to not allocate out of bounds
// or to b eable to see a crash report screen.
size_t max_size() const noexcept { return linearSpaceFree(); }
};
} // namespace amy