What user_cage needs from an allocator. It is constructed once, with the part of the cage it may hand out, and must be safe to call from every thread that uses the cage.
Declared in <cptr/user_cage.hpp>
template<class A>
concept region_allocator = std::constructible_from<A, std::span<std::byte>> &&
requires(A& a, void* p, std::size_t n) {
{ a.allocate(n, n) } -> std::same_as<void*>;
a.deallocate(p);
};
allocate(bytes, align) returns a block inside the region aligned to align (a power of two), or nullptr when it cannot.
deallocate(p) frees a block from allocate(). It gets no size, because the bundled containers do not pass one.