Go to the documentation of this file.
9 #ifndef EAGINE_MEMORY_C_REALLOC_HPP
10 #define EAGINE_MEMORY_C_REALLOC_HPP
16 namespace eagine::memory {
19 template <
typename Policy = default_
byte_allocator_policy>
20 class c_byte_reallocator
21 :
public byte_allocator_impl<Policy, c_byte_reallocator> {
25 auto equal(byte_allocator* a)
const noexcept ->
bool override {
26 return dynamic_cast<c_byte_reallocator*
>(a) !=
nullptr;
29 auto max_size(size_type) noexcept -> size_type
override {
30 return std::numeric_limits<size_type>::max();
33 auto has_allocated(
const owned_block&, size_type) noexcept
38 auto allocate(size_type n, size_type a) noexcept -> owned_block
override;
40 void deallocate(owned_block&& b, size_type) noexcept
override;
42 auto can_reallocate(
const owned_block&, size_type, size_type) noexcept
47 auto reallocate(owned_block&& b, size_type n, size_type a) noexcept
48 -> owned_block
override;
53 #include <eagine/memory/c_realloc.inl>
55 #endif // EAGINE_MEMORY_C_REALLOC_HPP
std::ptrdiff_t span_size_t
Signed span size type used by eagine.
Definition: types.hpp:36
constexpr static const indeterminate_t indeterminate
Constant representing unspecified tribool value.
Definition: tribool.hpp:24