diff options
Diffstat (limited to 'include/fud_allocator.hpp')
-rw-r--r-- | include/fud_allocator.hpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/include/fud_allocator.hpp b/include/fud_allocator.hpp index 8955fae..a9fbd67 100644 --- a/include/fud_allocator.hpp +++ b/include/fud_allocator.hpp @@ -32,8 +32,7 @@ class Allocator { virtual Result<void*, FudStatus> allocate(size_t bytes, size_t alignment = alignof(std::max_align_t)) = 0; - /* ...should this be void? */ - virtual void deallocate(void* pointer, size_t bytes, size_t alignment = alignof(std::max_align_t)) = 0; + virtual FudStatus deallocate(void* pointer, size_t bytes) = 0; virtual bool isEqual(const Allocator& rhs) const = 0; }; @@ -48,8 +47,7 @@ class FudAllocator : public Allocator { virtual Result<void*, FudStatus> allocate(size_t bytes, size_t alignment = alignof(std::max_align_t)) override; - /* ...should this be void? */ - virtual void deallocate(void* pointer, size_t bytes, size_t alignment = alignof(std::max_align_t)) override; + virtual FudStatus deallocate(void* pointer, size_t bytes) override; virtual bool isEqual(const Allocator& rhs) const override; }; @@ -59,12 +57,9 @@ extern FudAllocator globalFudAllocator; /** \brief The default allocation function for globalFudAllocator. */ extern void* fudAlloc(size_t size); -/** \brief The default allocation function for globalFudAllocator. */ -extern void* fudRealloc(void* ptr, size_t size); - +/** \brief The default deallocation function for globalFudAllocator. */ extern void fudFree(void* ptr); - } // namespace fud #endif |