diff --git a/include/bitcoin/system/arena.hpp b/include/bitcoin/system/arena.hpp index 68ce919331..8a0d7998fb 100644 --- a/include/bitcoin/system/arena.hpp +++ b/include/bitcoin/system/arena.hpp @@ -54,16 +54,16 @@ class arena /// Non-linear allocator just returns next address. /// Linear allocator resets to and returns buffer first address. /// Detachable linear allocator allocates buffer returns its first address. - virtual void* start() NOEXCEPT = 0; + virtual void* start(size_t baseline) THROWS = 0; /// Non-linear allocator just returns zero. /// Linear allocator returns current allocation size. /// Detachable linear allocator detaches allocation and returns its size. - virtual size_t detach() NOEXCEPT = 0; + virtual size_t detach() THROWS = 0; /// Non-linear and linear allocator is a nop. - /// Detachable linear allocator frees the memory associated with ptr. - virtual void release(void* ptr, size_t bytes) NOEXCEPT = 0; + /// Detachable linear allocator frees the memory associated with memory. + virtual void release(void* memory) NOEXCEPT = 0; private: virtual void* do_allocate(size_t bytes, size_t align) THROWS = 0; @@ -93,9 +93,9 @@ class BC_API default_arena final { public: static arena* get() NOEXCEPT; - void* start() NOEXCEPT override; - size_t detach() NOEXCEPT override; - void release(void* ptr, size_t bytes) NOEXCEPT override; + void* start(size_t baseline) THROWS override; + size_t detach() THROWS override; + void release(void* address) NOEXCEPT override; private: void* do_allocate(size_t bytes, size_t align) THROWS override; diff --git a/src/arena.cpp b/src/arena.cpp index 3ae19bbbea..a8b3cc7ca4 100644 --- a/src/arena.cpp +++ b/src/arena.cpp @@ -57,17 +57,17 @@ bool default_arena::do_is_equal(const arena& other) const NOEXCEPT return &other == this; } -void* default_arena::start() NOEXCEPT +void* default_arena::start(size_t) THROWS { return nullptr; } -size_t default_arena::detach() NOEXCEPT +size_t default_arena::detach() THROWS { return zero; } -void default_arena::release(void*, size_t) NOEXCEPT +void default_arena::release(void*) NOEXCEPT { } diff --git a/test/test.hpp b/test/test.hpp index 149c94ce18..bd5df89dc3 100644 --- a/test/test.hpp +++ b/test/test.hpp @@ -127,17 +127,17 @@ class reporting_arena size_t dec_count{}; size_t dec_bytes{}; - void* start() NOEXCEPT override + void* start(size_t) THROWS override { return nullptr; } - size_t detach() NOEXCEPT override + size_t detach() THROWS override { return zero; } - void release(void*, size_t) NOEXCEPT override + void release(void*) NOEXCEPT override { } @@ -198,17 +198,17 @@ class mock_arena size_t do_deallocate_align{}; mutable const arena* do_is_equal_address{}; - void* start() NOEXCEPT override + void* start(size_t) THROWS override { return nullptr; } - size_t detach() NOEXCEPT override + size_t detach() THROWS override { return zero; } - void release(void*, size_t) NOEXCEPT override + void release(void*) NOEXCEPT override { }