Description
Provides a fixed caller-owned relocatable allocation domain using one statically selected allocation algorithm. Instantiation introduces no runtime dispatch or stored callback. Stored geometry is validated by Create_Or_Attach and Attach. The selected algorithm owns allocation synchronization, abandonment, poison, and recovery semantics.
Algorithm
with package Algorithm is new Flyology_Allocators.Allocation_Algorithms.Contract (<>);
Allocated
Allocated : constant Allocation_Result := Allocation_Algorithms.Allocated;
Allocation_Contended
Allocation_Contended : constant Allocation_Result := Allocation_Algorithms.Allocation_Contended;
Allocation_Handle
subtype Allocation_Handle is Allocation_Algorithms.Allocation_Handle;
Allocation_Result
subtype Allocation_Result is Allocation_Algorithms.Allocation_Result;
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)
Parameters
- Region
- Item
- Value
Block_Capacity
function Block_Capacity
(Item : Algorithm.View; Value : Allocation_Algorithms.Allocation_Handle) return Byte_Count
Parameters
- Item
- Value
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)
Parameters
- Item
- 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
Parameters
- Item
Return value
Destroy
procedure Destroy (Item : in out Algorithm.View)
Parameters
- Item
Detach
procedure Detach (Item : in out Algorithm.View)
Parameters
- Item
Exhausted
Exhausted : constant Allocation_Result := Allocation_Algorithms.Exhausted;
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
Parameters
- Item
Return value
Is_Poisoned
function Is_Poisoned (Item : Algorithm.View) return Boolean
Parameters
- Item
Return value
Metadata
subtype Metadata is Allocation_Algorithms.Metadata;
Minimum_Block_Limit
Minimum_Block_Limit : constant Positive := Algorithm.Minimum_Block_Limit;
Null_Allocation
Null_Allocation : constant Allocation_Handle := Allocation_Algorithms.Null_Allocation;
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)
Parameters
- Item
- Value
Release
procedure Release
(Item : in out Algorithm.View; Value : Allocation_Algorithms.Allocation_Handle; Timeout : Wait_Timeout)
Parameters
- Item
- Value
- 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)
Parameters
- Item
- Requested_Size
- Value
- Result
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)
Parameters
- Item
- Requested_Size
- Timeout
- Value
- Result
View
subtype View is Algorithm.View;