diff options
author | Dominick Allen <djallen@librehumanitas.org> | 2024-10-17 19:42:29 -0500 |
---|---|---|
committer | Dominick Allen <djallen@librehumanitas.org> | 2024-10-17 19:42:29 -0500 |
commit | 8249b28bea29e8ce17eac12776a60ec3f9e47176 (patch) | |
tree | 98318d7564b5f618cfb59e23cc6b918fcab88ee8 /include/fud_allocator.hpp | |
parent | b32e83ece42cec5aa9dee370bcdf349d23dbc8ba (diff) |
Rename InvalidInput to ArgumentInvalid.
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 |