Template Struct BlockManagerInterface

Inheritance Relationships

Derived Type

Struct Documentation

template<typename T>
struct BlockManagerInterface

Virtual lookup, merge, and culling interface for block managers.

Subclassed by CE::Memory::AbstractBlockManager< T >

Public Functions

virtual ~BlockManagerInterface() = default

Release the polymorphic facade; retained state/release contexts can outlive it under their own contracts.

virtual void cull(std::chrono::minutes age) = 0

Queue sufficiently old complete free owners for later release.

Parameters:

age – Minimum staleness duration in minutes; this does not force live ranges free. Concrete implementations define collection synchronization; final owner destruction belongs to release_culled().

virtual void release_culled() = 0

Release still-eligible queued whole owners; do not destroy final backing under collection locks.

Exact validation and lifecycle policy belong to the concrete manager.

Protected Functions

virtual void record_new(::CE::Memory::Block<T>) = 0

Record a complete backing owner in a derived manager’s registry.

Parameters:

block – Valid complete owner metadata. Derived managers/transactions own locking and partition invariants; this interface alone does not allocate or construct objects.

virtual void mark_stale(::CE::Memory::Block<T>) = 0

Mark a complete free owner eligible for age-based culling.

Parameters:

block – Exact current owner metadata; derived managers enforce whether it is fully free.

virtual ::CE::Memory::OptionalBlock<T> merge_into_pool(::CE::Memory::Block<T>) = 0

Return a current range and merge compatible free neighbors.

Parameters:

block – Checked-out range whose user/object lifetime has ended.

Returns:

Merged free range or no value when rejected; concrete manager policy determines errors and locking.

virtual ::CE::Memory::OptionalBlock<T> find_section(T*) = 0

Find range metadata containing a pointer in recorded split sections.

Parameters:

pointer – Address in candidate backing storage.

Returns:

Retained range metadata or no match; observation does not reserve the range against concurrent checkout/return.

virtual ::CE::Memory::OptionalBlock<T> find_owner(T*) = 0

Find complete backing-allocation metadata containing a pointer.

Parameters:

pointer – Candidate address.

Returns:

Retained owner metadata or no match; this is not ownership transfer or a live-object check.

virtual ::CE::Memory::OptionalBlock<T> fill_request(std::size_t, std::align_val_t minimum_alignment = std::align_val_t{0}) = 0

Claim an existing compatible free range without allocating new backing.

Parameters:
  • count – Required elements, or bytes for void.

  • minimum_alignment – Minimum head alignment in bytes; concrete typed/void defaults may impose a stronger minimum.

Returns:

Claimed whole range or no match. Compound split checkout belongs to BlockTransactions::checkout().

Friends

friend class ::Test_iManage