← All compilation units

Flyology_Allocators.Allocation_Algorithms.Contract

Description

Smallest allocation unit accepted by this implementation.

Algorithm_Capabilities

Algorithm_Capabilities : Allocation_Algorithms.Allocation_Capabilities;

Algorithm_Configuration

type Algorithm_Configuration is private;

Algorithm_Minimum_Block_Limit

Algorithm_Minimum_Block_Limit : Positive;

Algorithm_View

type Algorithm_View is limited private;

Attach

procedure Attach
  (Item          : out Algorithm_View;
   Region        : Region_View;
   Location      : Region_Offset;
   Configuration : Algorithm_Configuration;
   Instance_ID   : Interfaces.Unsigned_64)
Parameters
Item
Region
Location
Configuration
Instance_ID

Attach_Allocation

procedure Attach_Allocation
  (Region : in out Region_View; Item : Algorithm_View; Value : Allocation_Algorithms.Allocation_Handle)

Copy between live allocation slices.

Parameters
Region
Item

Attached allocator view @param Source Source allocation handle @param Source_Offset Source slice offset @param Target Target allocation handle @param Target_Offset Target slice offset @param Length Bytes to copy

Value

Block_Capacity

function Block_Capacity
  (Item : Algorithm_View; Value : Allocation_Algorithms.Allocation_Handle) return Byte_Count

Attach a checked region view to one live allocation. @param Region Allocation-region view attached on success

Parameters
Item

Attached allocator view

Value

Live allocation handle

Return value

Capabilities

Capabilities : constant Allocation_Algorithms.Allocation_Capabilities := Algorithm_Capabilities;

Configuration

subtype Configuration is Algorithm_Configuration;

Copy

procedure Copy
  (Item          : Algorithm_View;
   Source        : Allocation_Algorithms.Allocation_Handle;
   Source_Offset : Byte_Count;
   Target        : Allocation_Algorithms.Allocation_Handle;
   Target_Offset : Byte_Count;
   Length        : Byte_Count)

Destroy an empty quiescent allocator and detach Item.

Parameters
Item

Exclusively synchronized allocator view

Source
Source_Offset
Target
Target_Offset
Length

Create_Or_Attach

procedure Create_Or_Attach
  (Item          : out Algorithm_View;
   Region        : Region_View;
   Location      : Region_Offset;
   Configuration : Algorithm_Configuration;
   Instance_ID   : Interfaces.Unsigned_64;
   Result        : out Open_Result)
Parameters
Item
Region
Location
Configuration
Instance_ID
Result

Current_Metadata

function Current_Metadata (Item : Algorithm_View) return Allocation_Algorithms.Metadata

Test the persisted poison lifecycle.

Parameters
Item

Attached allocator view

Return value

True only when explicitly poisoned

Destroy

procedure Destroy (Item : in out Algorithm_View)
Parameters
Item

Detach

procedure Detach (Item : in out Algorithm_View)

Test whether a local view remains attached.

Parameters
Item

View to inspect @return True while Item retains attachment information

Implementation_Attach

procedure Implementation_Attach
  (Item          : out Algorithm_View;
   Region        : Region_View;
   Location      : Region_Offset;
   Configuration : Algorithm_Configuration;
   Instance_ID   : Interfaces.Unsigned_64)
Parameters
Item
Region
Location
Configuration
Instance_ID

Implementation_Attach_Allocation

procedure Implementation_Attach_Allocation
  (Region : in out Region_View; Item : Algorithm_View; Value : Allocation_Algorithms.Allocation_Handle)
Parameters
Region
Item
Value

Implementation_Block_Capacity

function Implementation_Block_Capacity
  (Item : Algorithm_View; Value : Allocation_Algorithms.Allocation_Handle) return Byte_Count
Parameters
Item
Value
Return value

Implementation_Copy

procedure Implementation_Copy
  (Item          : Algorithm_View;
   Source        : Allocation_Algorithms.Allocation_Handle;
   Source_Offset : Byte_Count;
   Target        : Allocation_Algorithms.Allocation_Handle;
   Target_Offset : Byte_Count;
   Length        : Byte_Count)
Parameters
Item
Source
Source_Offset
Target
Target_Offset
Length

Implementation_Create_Or_Attach

procedure Implementation_Create_Or_Attach
  (Item          : out Algorithm_View;
   Region        : Region_View;
   Location      : Region_Offset;
   Configuration : Algorithm_Configuration;
   Instance_ID   : Interfaces.Unsigned_64;
   Result        : out Open_Result)
Parameters
Item
Region
Location
Configuration
Instance_ID
Result

Implementation_Current_Metadata

function Implementation_Current_Metadata (Item : Algorithm_View) return Allocation_Algorithms.Metadata
Parameters
Item
Return value

Implementation_Destroy

procedure Implementation_Destroy (Item : in out Algorithm_View)
Parameters
Item

Implementation_Detach

procedure Implementation_Detach (Item : in out Algorithm_View)
Parameters
Item

Implementation_Initialize

procedure Implementation_Initialize
  (Item          : out Algorithm_View;
   Region        : Region_View;
   Location      : Region_Offset;
   Configuration : Algorithm_Configuration;
   Instance_ID   : Interfaces.Unsigned_64)
Parameters
Item
Region
Location
Configuration
Instance_ID

Implementation_Is_Attached

function Implementation_Is_Attached (Item : Algorithm_View) return Boolean
Parameters
Item
Return value

Implementation_Is_Poisoned

function Implementation_Is_Poisoned (Item : Algorithm_View) return Boolean
Parameters
Item
Return value

Implementation_Minimum_Block_Size

function Implementation_Minimum_Block_Size (Configuration : Algorithm_Configuration) return Positive
Parameters
Configuration
Return value

Implementation_Poison

procedure Implementation_Poison (Region : Region_View; Location : Region_Offset)
Parameters
Region
Location

Implementation_Release_Immediate

procedure Implementation_Release_Immediate
  (Item : in out Algorithm_View; Value : Allocation_Algorithms.Allocation_Handle)
Parameters
Item
Value

Implementation_Release_Timed

procedure Implementation_Release_Timed
  (Item    : in out Algorithm_View;
   Value   : Allocation_Algorithms.Allocation_Handle;
   Timeout : Wait_Timeout)
Parameters
Item
Value
Timeout

Implementation_Required_Storage

function Implementation_Required_Storage (Configuration : Algorithm_Configuration) return Byte_Count
Parameters
Configuration
Return value

Implementation_Try_Allocate_Immediate

procedure Implementation_Try_Allocate_Immediate
  (Item           : in out Algorithm_View;
   Requested_Size : Positive;
   Value          : out Allocation_Algorithms.Allocation_Handle;
   Result         : out Allocation_Algorithms.Allocation_Result)
Parameters
Item
Requested_Size
Value
Result

Implementation_Try_Allocate_Timed

procedure Implementation_Try_Allocate_Timed
  (Item           : in out Algorithm_View;
   Requested_Size : Positive;
   Timeout        : Wait_Timeout;
   Value          : out Allocation_Algorithms.Allocation_Handle;
   Result         : out Allocation_Algorithms.Allocation_Result)
Parameters
Item
Requested_Size
Timeout
Value
Result

Implementation_Usable_Capacity

function Implementation_Usable_Capacity (Configuration : Algorithm_Configuration) return Positive
Parameters
Configuration
Return value

Initialize

procedure Initialize
  (Item          : out Algorithm_View;
   Region        : Region_View;
   Location      : Region_Offset;
   Configuration : Algorithm_Configuration;
   Instance_ID   : Interfaces.Unsigned_64)
Parameters
Item
Region
Location
Configuration
Instance_ID

Is_Attached

function Is_Attached (Item : Algorithm_View) return Boolean

Return common immutable allocator metadata.

Parameters
Item

Attached allocator view

Return value

Capacity, minimum unit, identity, incarnation, and extent

Is_Poisoned

function Is_Poisoned (Item : Algorithm_View) return Boolean

Poison after algorithm-specific external quiescence authorization. @param Region Attached backing region @param Location Stored allocator location

Parameters
Item
Return value

Minimum_Block_Limit

Minimum_Block_Limit : constant Positive := Algorithm_Minimum_Block_Limit;

Minimum_Block_Size

function Minimum_Block_Size (Configuration : Algorithm_Configuration) return Positive
Parameters
Configuration
Return value

Poison

procedure Poison (Region : Region_View; Location : Region_Offset)
Parameters
Region
Location

Release

procedure Release (Item : in out Algorithm_View; Value : Allocation_Algorithms.Allocation_Handle)

Release one live allocation while waiting for metadata contention.

Parameters
Item

Attached allocator view

Value

Live allocation handle @param Timeout Maximum contention wait

Release

procedure Release
  (Item : in out Algorithm_View; Value : Allocation_Algorithms.Allocation_Handle; Timeout : Wait_Timeout)

Return the usable capacity of one live allocation.

Parameters
Item

Attached allocator view

Value

Live allocation handle @return Usable allocation bytes

Timeout

Required_Storage

function Required_Storage (Configuration : Algorithm_Configuration) return Byte_Count
Parameters
Configuration
Return value

Try_Allocate

procedure Try_Allocate
  (Item           : in out Algorithm_View;
   Requested_Size : Positive;
   Value          : out Allocation_Algorithms.Allocation_Handle;
   Result         : out Allocation_Algorithms.Allocation_Result)

Attempt allocation while waiting only for metadata contention.

Parameters
Item

Attached allocator view

Requested_Size

Positive requested payload bytes @param Timeout Maximum contention wait

Value

New handle or Null_Allocation

Result

Allocation or exhaustion outcome

Try_Allocate

procedure Try_Allocate
  (Item           : in out Algorithm_View;
   Requested_Size : Positive;
   Timeout        : Wait_Timeout;
   Value          : out Allocation_Algorithms.Allocation_Handle;
   Result         : out Allocation_Algorithms.Allocation_Result)

Release one live allocation without waiting.

Parameters
Item

Attached allocator view

Requested_Size
Timeout
Value

Live allocation handle

Result

Usable_Capacity

function Usable_Capacity (Configuration : Algorithm_Configuration) return Positive
Parameters
Configuration
Return value

View

subtype View is Algorithm_View;