diff --git a/include/amethyst/linearAlloc.hpp b/include/amethyst/linearAlloc.hpp index ff2098a..c89afc4 100644 --- a/include/amethyst/linearAlloc.hpp +++ b/include/amethyst/linearAlloc.hpp @@ -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 \ No newline at end of file