xo-alloc2: + Allocator::alloc_info()

Also extend unit test
This commit is contained in:
Roland Conybeare 2025-12-16 16:44:44 -05:00
commit ef8ec32a2d
15 changed files with 156 additions and 40 deletions

View file

@ -209,6 +209,8 @@ namespace xo {
/** expand gen0 committed size to at least @p z.
**/
bool expand(size_type z) noexcept;
/** Retreive bookkeeping info for allocation at @p mem. **/
AllocInfo alloc_info(value_type mem) noexcept;
// ----- book-keeping -----

View file

@ -56,6 +56,8 @@ namespace xo {
static value_type sub_alloc(DX1Collector & d, size_type z, bool complete) noexcept;
/** expand gen0 spaces (both from-space and to-space) **/
static bool expand(DX1Collector & d, size_type z) noexcept;
/** fetch allocation bookkeeping info **/
static AllocInfo alloc_info(DX1Collector & d, value_type mem) noexcept;
/** reset to empty state; clears all generations **/
static void clear(DX1Collector & d);