Difference between revisions of "Unit HeapManager"

From Ultibo.org
Jump to: navigation, search
Line 1,152: Line 1,152:
 
|}
 
|}
 
</div></div>
 
</div></div>
<br />  
+
<br />
 +
 
 +
'''Internal functions'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function GetHeapBlock(Address:Pointer):PHeapBlock;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the Heap Block referenced by Address</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| Address has already been normalized to include the Heap Block. Caller must hold the heap lock.
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function FindHeapBlock(Address:Pointer; Size:PtrUInt):PHeapBlock;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Find the Heap Block containing Address up to the Size specified</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| Address has already been normalized to include the Heap Block. Caller must hold the heap lock.
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function AddHeapBlock(Block:PHeapBlock):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Add a heap block, sorted by ascending Address order</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| Caller must hold the heap lock
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function SplitHeapBlock(Block:PHeapBlock; Size:PtrUInt):PHeapBlock;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Split a heap block at the size indicated</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Return'''
 +
| Return The return is the split portion of the block
 +
|-
 +
! '''Note'''
 +
| Caller must remove block from the free list. Caller must add split block to the free list. Caller must hold the heap lock.
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function MergeHeapBlock(Block:PHeapBlock):PHeapBlock;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Merge a heap block with Prev or Next blocks if free</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Return'''
 +
| The return is the merged result of the blocks
 +
|-
 +
! '''Note'''
 +
| Caller must remove block from the free list. Caller must add merged block to the free list. Caller must hold the heap lock.
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function GetFreeBlock(Size:PtrUInt):PHeapBlock;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get a free block of at least the size indicated</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Size'''
 +
| The size has already been normalized to alignment and includes the size of the Heap Block
 +
|-
 +
! '''Note'''
 +
| Caller must hold the heap lock
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function GetFreeBlockEx(Size:PtrUInt; Flags,Affinity:LongWord):PHeapBlock;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get a free block of at least the size indicated with the flags and affinity requested</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Size'''
 +
| The size has already been normalized to alignment and includes the size of the Heap Block
 +
|-
 +
! '''Note'''
 +
| Caller must hold the heap lock
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function FindFreeBlock(Size:PtrUInt):PHeapBlock;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Find a free block of at least the size indicated with no flags or affinity which is alignable to the HEAP_REQUEST_ALIGNMENT value</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Size'''
 +
| The size is the exact size and has not been normalized
 +
|-
 +
! '''Note'''
 +
| Caller must hold the heap lock
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function AddFreeBlock(Block:PHeapBlock):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Add a free block, sorted by ascending Size order</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| Caller must hold the heap lock
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RemoveFreeBlock(Block:PHeapBlock):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Remove a free block</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| Caller must hold the heap lock
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function GetUsedBlock(Address:Pointer):PHeapBlock;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get a used block by address</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Address'''
 +
| The address has already been normalized to include the Heap Block
 +
|-
 +
! '''Note'''
 +
| Caller must hold the heap lock
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function CheckUsedBlock(Address:Pointer):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check a used block by address</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Address'''
 +
| The address has already been normalized to include the Heap Block
 +
|-
 +
! '''Note'''
 +
| Caller must hold the heap lock
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function AddUsedBlock(Block:PHeapBlock):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Add a used block</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| Caller must hold the heap lock
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RemoveUsedBlock(Block:PHeapBlock):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Remove a used block</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| Caller must hold the heap lock
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function GetIRQBlock(Address:Pointer):PHeapBlock;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the IRQ Heap Block referenced by Address</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Address'''
 +
| The address has already been normalized to include the IRQ Heap Block
 +
|-
 +
! '''Note'''
 +
| Caller must hold the IRQ heap lock
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function CheckIRQBlock(Address:Pointer):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check the IRQ Heap Block referenced by Address</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Address'''
 +
| The address has already been normalized to include the IRQ Heap Block
 +
|-
 +
! '''Note'''
 +
| Caller must hold the IRQ heap lock
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function AddIRQBlock(Block:PHeapBlock):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Add an IRQ heap block, sorted by ascending Address order</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| Caller must hold the IRQ heap lock
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function SplitIRQBlock(Block:PHeapBlock; Size:PtrUInt):PHeapBlock;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Split an IRQ heap block at the size indicated</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Return'''
 +
| The return is the split portion of the block
 +
|-
 +
! '''Note'''
 +
| Caller must remove block from the IRQ free list. Caller must add split block to the IRQ free list. Caller must hold the IRQ heap lock.
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function MergeIRQBlock(Block:PHeapBlock):PHeapBlock;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Merge an IRQ heap block with Prev or Next blocks if free</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Return'''
 +
| The return is the merged result of the blocks
 +
|-
 +
! '''Note'''
 +
| Caller must remove block from the IRQ free list. Caller must add merged block to the IRQ free list. Caller must hold the IRQ heap lock.
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function GetFreeIRQBlock(Size:PtrUInt; Affinity:LongWord):PHeapBlock;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get a free IRQ block of at least the size indicated</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Size'''
 +
| The size has already been normalized to alignment and includes the size of the IRQ Heap Block
 +
|-
 +
! '''Note'''
 +
| Caller must hold the IRQ heap lock
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function AddFreeIRQBlock(Block:PHeapBlock):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Add a free IRQ block, sorted by ascending Size order</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| Caller must hold the IRQ heap lock
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RemoveFreeIRQBlock(Block:PHeapBlock):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Remove a free IRQ block</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| Caller must hold the IRQ heap lock
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function GetFIQBlock(Address:Pointer):PHeapBlock;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the FIQ Heap Block referenced by Address</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Address'''
 +
| The address has already been normalized to include the FIQ Heap Block
 +
|-
 +
! '''Note'''
 +
| Caller must hold the FIQ heap lock
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function CheckFIQBlock(Address:Pointer):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check the FIQ Heap Block referenced by Address</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Address'''
 +
| The address has already been normalized to include the FIQ Heap Block
 +
|-
 +
! '''Note'''
 +
| Caller must hold the FIQ heap lock
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function AddFIQBlock(Block:PHeapBlock):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Add an FIQ heap block, sorted by ascending Address order</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| Caller must hold the FIQ heap lock
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function SplitFIQBlock(Block:PHeapBlock; Size:PtrUInt):PHeapBlock;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Split an FIQ heap block at the size indicated</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Return'''
 +
| The return is the split portion of the block
 +
|-
 +
! '''Note'''
 +
| Caller must remove block from the FIQ free list. Caller must add split block to the FIQ free list. Caller must hold the FIQ heap lock.
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function MergeFIQBlock(Block:PHeapBlock):PHeapBlock;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Merge an FIQ heap block with Prev or Next blocks if free</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Return'''
 +
| The return is the merged result of the blocks
 +
|-
 +
! '''Note'''
 +
| Caller must remove block from the FIQ free list. Caller must add merged block to the FIQ free list. Caller must hold the FIQ heap lock.
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function GetFreeFIQBlock(Size:PtrUInt; Affinity:LongWord):PHeapBlock;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get a free FIQ block of at least the size indicated</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Size'''
 +
| The size has already been normalized to alignment and includes the size of the FIQ Heap Block
 +
|-
 +
! '''Note'''
 +
| Caller must hold the FIQ heap lock
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function AddFreeFIQBlock(Block:PHeapBlock):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Add a free FIQ block, sorted by ascending Size order</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| Caller must hold the FIQ heap lock
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RemoveFreeFIQBlock(Block:PHeapBlock):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Remove a free FIQ block</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| Caller must hold the FIQ heap lock
 +
|-
 +
|}
 +
</div></div>
 +
<br />
  
  
 
Return to [[Unit_Reference|Unit Reference]]
 
Return to [[Unit_Reference|Unit Reference]]

Revision as of 04:52, 18 August 2016

Return to Unit Reference


Description


To be documented

Constants


To be documented

Type definitions


To be documented

Public variables


To be documented

Function declarations



Initialization functions

procedure RegisterMemoryManager;
Description: To be documented
Note To be documented


procedure RegisterHeapBlock(Address:Pointer; Size:PtrUInt);
Description: To be documented
Note To be documented


function RequestHeapBlock(Hint:Pointer; Size:PtrUInt; Flags,Affinity:LongWord):Pointer;
Description: Request registration a Heap Block with specified flags and affinity within an existing block
Hint The hint provides the requested base address of the heap block but may be overridden by the memory manager if the block is already partially or fully allocated, pass nil if any heap block is suitable
Size The size provides the requested size of the heap block. Size must be a power of 2 and both Hint and the returned pointer must be aligned on a multiple of HEAP_REQUEST_ALIGNMENT. Flags provides the heap block flags such as shared, local, code, device, nocache etc.
Affinity The affinity provides the processor affinity mask, a mask of 0 indicates no specific processor
Return The return is the heap block that has been registered or nil if the request failed
Note To allocate this memory use GetMemEx / AllocMemEx etc. The return value points directly to the heap block, to access the memory referenced by the heap block you must add SizeOf(THeapBlock) to this value.


function RequestSharedHeapBlock(Hint:Pointer; Size:PtrUInt):Pointer;
Description: Request registration of a Shared Heap Block within an existing block
Hint The hint provides the requested base address of the shared heap block but may be overridden by the memory manager if the block is already partially or fully allocated, pass nil if any heap block is suitable
Size The size provides the requested size of the heap block. Size must be a power of 2 and both Hint and the returned pointer must be aligned on a multiple of HEAP_REQUEST_ALIGNMENT.
Return The return is the heap block that has been marked as shared or nil if the request failed (the memory management unit should mark this region of memory as sharable)
Note To allocate shared memory use GetSharedMem / AllocSharedMem etc. The return value points directly to the heap block, to access the memory referenced by the heap block you must add SizeOf(THeapBlock) to this value.


function RequestLocalHeapBlock(Hint:Pointer; Size:PtrUInt; Affinity:LongWord):Pointer;
Description: Request registration of a Local Heap Block within an existing block
Hint The hint provides a requested base address of the local heap block but may be overridden by the memory manager if the block is already partially or fully allocated, pass nil if any heap block is suitable
Size The size provides the requested size of the heap block. Size must be a power of 2 and both Hint and the returned pointer must be aligned on a multiple of HEAP_REQUEST_ALIGNMENT.
Affinity The affinity provides the processor affinity mask, a mask of 0 indicates no specific processor
Return The return is the heap block that has been marked as local or nil if the request failed (The memory management unit should mark this region of memory as local or non global)
Note To allocate local memory use GetLocalMem / AllocLocalMem etc. The return value points directly to the heap block, to access the memory referenced by the heap block you must add SizeOf(THeapBlock) to this value.


function RequestCodeHeapBlock(Hint:Pointer; Size:PtrUInt; Affinity:LongWord):Pointer;
Description: Request registration of a Code Heap Block within an existing block
Hint The hint provides a requested base address of the code heap block but may be overridden by the memory manager if the block is already partially or fully allocated, pass nil if any heap block is suitable
Size The size provides the requested size of the heap block. Size must be a power of 2 and both Hint and the returned pointer must be aligned on a multiple of HEAP_REQUEST_ALIGNMENT.
Affinity The affinity provides the processor affinity mask, a mask of 0 indicates no specific processor
Return The return is the heap block that has been marked as code or nil if the request failed (The memory management unit should mark this region of memory as executable)
Note To allocate code memory use GetCodeMem / AllocCodeMem etc. The return value points directly to the heap block, to access the memory referenced by the heap block you must add SizeOf(THeapBlock) to this value.


function RequestDeviceHeapBlock(Hint:Pointer; Size:PtrUInt):Pointer;
Description: Request registration of a Device Heap Block within an existing block
Hint The hint provides the requested base address of the device heap block but may be overridden by the memory manager if the block is already partially or fully allocated, pass nil if any heap block is suitable
Size The size provides the requested size of the heap block. Size must be a power of 2 and both Hint and the returned pointer must be aligned on a multiple of HEAP_REQUEST_ALIGNMENT.
Return The return is the heap block that has been marked as device or nil if the request failed (The memory management unit should mark this region of memory as sharable)
Note To allocate device memory use GetDeviceMem / AllocDeviceMem etc. The return value points directly to the heap block, to access the memory referenced by the heap block you must add SizeOf(THeapBlock) to this value.


function RequestNoCacheHeapBlock(Hint:Pointer; Size:PtrUInt):Pointer;
Description: Request registration of a Non Cached Heap Block within an existing block
Hint The hint provides the requested base address of the non cached heap block but may be overridden by the memory manager if the block is already partially or fully allocated, pass nil if any heap block is suitable
Size The size provides the requested size of the heap block. Size must be a power of 2 and both Hint and the returned pointer must be aligned on a multiple of HEAP_REQUEST_ALIGNMENT.
Return The return is the heap block that has been marked as non cached or nil if the request failed (The memory management unit should mark this region of memory as sharable)
Note To allocate non cached memory use GetNoCacheMem / AllocNoCacheMem etc. The return value points directly to the heap block, to access the memory referenced by the heap block you must add SizeOf(THeapBlock) to this value.


function RequestNonSharedHeapBlock(Hint:Pointer; Size:PtrUInt):Pointer;
Description: Request registration of a Non Shared Heap Block within an existing block
Hint The hint provides the requested base address of the non shared heap block but may be overridden by the memory manager if the block is already partially or fully allocated, pass nil if any heap block is suitable
Size The size provides the requested size of the heap block. Size must be a power of 2 and both Hint and the returned pointer must be aligned on a multiple of HEAP_REQUEST_ALIGNMENT.
Return The return is the heap block that has been marked as non shared or nil if the request failed (The memory management unit should mark this region of memory as sharable)
Note To allocate non shared memory use GetNonSharedMem / AllocNonSharedMem etc. The return value points directly to the heap block, to access the memory referenced by the heap block you must add SizeOf(THeapBlock) to this value.


function RequestIRQHeapBlock(Hint:Pointer; Size:PtrUInt; Affinity:LongWord):Pointer;
Description: Request registration of an IRQ Heap Block within an existing block
Hint The hint provides a requested base address of the IRQ heap block but may be overridden by the memory manager if the block is already partially or fully allocated, pass nil if any heap block is suitable
Size The size provides the requested size of the heap block. Size must be a power of 2 and both Hint and the returned pointer must be aligned on a multiple of HEAP_REQUEST_ALIGNMENT.
Affinity The affinity provides the processor affinity mask, a mask of 0 indicates no specific processor
Return The return is the heap block that has been marked as IRQ or nil if the request failed
Note To allocate IRQ memory use GetIRQMem / AllocIRQMem etc. The return value points directly to the heap block, to access the memory referenced by the heap block you must add SizeOf(THeapBlock) to this value.


function RequestFIQHeapBlock(Hint:Pointer; Size:PtrUInt; Affinity:LongWord):Pointer;
Description: Request registration of an FIQ Heap Block within an existing block
Hint The hint provides a requested base address of the FIQ heap block but may be overridden by the memory manager if the block is already partially or fully allocated, pass nil if any heap block is suitable
Size The size provides the requested size of the heap block. Size must be a power of 2 and both Hint and the returned pointer must be aligned on a multiple of HEAP_REQUEST_ALIGNMENT.
Affinity The affinity provides the processor affinity mask, a mask of 0 indicates no specific processor
Return The return is the heap block that has been marked as FIQ or nil if the request failed
Note To allocate FIQ memory use GetFIQMem / AllocFIQMem etc. The return value points directly to the heap block, to access the memory referenced by the heap block you must add SizeOf(THeapBlock) to this value.


Heap functions

function GetMemEx(Size:PtrUInt; Flags,Affinity:LongWord):Pointer;
Description: Allocate a block of memory with the flags and affinity requested
Note To be documented


function GetAlignedMem(Size,Alignment:PtrUInt):Pointer;
Description: Allocate a block of normal memory aligned on a multiple of the alignment value
Alignment The alignment must be a multiple of the minimum alignment configuration


function GetAlignedMemEx(Size,Alignment:PtrUInt; Flags,Affinity:LongWord):Pointer;
Description: Allocate a block of memory aligned on a multiple of the alignment value with the flags and affinity requested
Alignment The alignment must be a multiple of the minimum alignment configuration


function GetSharedMem(Size:PtrUInt):Pointer;
Description: Allocate a block of shared memory
Note To be documented


function GetSharedAlignedMem(Size,Alignment:PtrUInt):Pointer;
Description: Allocate a block of shared memory aligned on a multiple of the alignment value
Alignment The alignment must be a multiple of the minimum alignment configuration


function GetLocalMem(Size:PtrUInt; Affinity:LongWord):Pointer;
Description: Allocate a block of local memory
Note To be documented


function GetLocalAlignedMem(Size,Alignment:PtrUInt; Affinity:LongWord):Pointer;
Description: Allocate a block of local memory aligned on a multiple of the alignment value
Alignment The alignment must be a multiple of the minimum alignment configuration


function GetCodeMem(Size:PtrUInt; Affinity:LongWord):Pointer;
Description: Allocate a block of code memory
Note To be documented


function GetCodeAlignedMem(Size,Alignment:PtrUInt; Affinity:LongWord):Pointer;
Description: Allocate a block of code memory aligned on a multiple of the alignment value
Alignment The alignment must be a multiple of the minimum alignment configuration


function GetDeviceMem(Size:PtrUInt):Pointer;
Description: Allocate a block of device memory
Note To be documented


function GetDeviceAlignedMem(Size,Alignment:PtrUInt):Pointer;
Description: Allocate a block of device memory aligned on a multiple of the alignment value
Alignment The alignment must be a multiple of the minimum alignment configuration


function GetNoCacheMem(Size:PtrUInt):Pointer;
Description: Allocate a block of non cached memory
Note To be documented


function GetNoCacheAlignedMem(Size,Alignment:PtrUInt):Pointer;
Description: Allocate a block of non cached memory aligned on a multiple of the alignment value
Alignment The alignment must be a multiple of the minimum alignment configuration


function GetNonSharedMem(Size:PtrUInt):Pointer;
Description: Allocate a block of non shared memory
Note To be documented


function GetNonSharedAlignedMem(Size,Alignment:PtrUInt):Pointer;
Description: Allocate a block of non shared memory aligned on a multiple of the alignment value
Alignment The alignment must be a multiple of the minimum alignment configuration


function GetIRQMem(Size:PtrUInt; Affinity:LongWord):Pointer;
Description: Allocate a block of IRQ memory
Note To be documented


function GetIRQAlignedMem(Size,Alignment:PtrUInt; Affinity:LongWord):Pointer;
Description: Allocate a block of IRQ memory aligned on a multiple of the alignment value
Alignment The alignment must be a multiple of the minimum alignment configuration


function GetFIQMem(Size:PtrUInt; Affinity:LongWord):Pointer;
Description: Allocate a block of FIQ memory
Note To be documented


function GetFIQAlignedMem(Size,Alignment:PtrUInt; Affinity:LongWord):Pointer;
Description: Allocate a block of FIQ memory aligned on a multiple of the alignment value
Alignment The alignment must be a multiple of the minimum alignment configuration


function FreeIRQMem(Addr:Pointer):PtrUInt;
Description: Free a block of IRQ memory
Note To be documented


function FreeFIQMem(Addr:Pointer):PtrUInt;
Description: Free a block of FIQ memory
Note To be documented


function AllocMemEx(Size:PtrUInt; Flags,Affinity:LongWord):Pointer;
Description: Allocate and clear a block of memory with the flags and affinity requested
Note To be documented


function ReAllocMemEx(var Addr:Pointer; Size:PtrUInt; Flags,Affinity:LongWord):Pointer;
Description: Reallocate a block of memory with the flags and affinity requested
Note To be documented


function AllocAlignedMem(Size,Alignment:PtrUInt):Pointer;
Description: Allocate and clear a block of normal memory aligned on a multiple of the alignment value
Alignment The alignment must be a multiple of the minimum alignment configuration


function AllocAlignedMemEx(Size,Alignment:PtrUInt; Flags,Affinity:LongWord):Pointer;
Description: Allocate and clear a block of normal memory aligned on a multiple of the alignment value with the flags and affinity requested
Alignment The alignment must be a multiple of the minimum alignment configuration


function ReAllocAlignedMem(var Addr:Pointer; Size,Alignment:PtrUInt):Pointer;
Description: Reallocate a block of normal memory aligned on a multiple of the alignment value
Alignment The alignment must be a multiple of the minimum alignment configuration


function ReAllocAlignedMemEx(var Addr:Pointer; Size,Alignment:PtrUInt; Flags,Affinity:LongWord):Pointer;
Description: Reallocate a block of memory aligned on a multiple of the alignment value with the flags and affinity requested
Alignment The alignment must be a multiple of the minimum alignment configuration


function AllocSharedMem(Size:PtrUInt):Pointer;
Description: Allocate and clear a block of shared memory
Note To be documented


function AllocSharedAlignedMem(Size,Alignment:PtrUInt):Pointer;
Description: Allocate and clear a block of shared memory aligned on a multiple of the alignment value
Alignment The alignment must be a multiple of the minimum alignment configuration


function ReAllocSharedMem(var Addr:Pointer; Size:PtrUInt):Pointer;
Description: Reallocate a block of shared memory
Note To be documented


function ReAllocSharedAlignedMem(var Addr:Pointer; Size,Alignment:PtrUInt):Pointer;
Description: Reallocate a block of shared memory aligned on a multiple of the alignment value
Alignment The alignment must be a multiple of the minimum alignment configuration


function AllocLocalMem(Size:PtrUInt; Affinity:LongWord):Pointer;
Description: Allocate and clear a block of local memory
Note To be documented


function AllocLocalAlignedMem(Size,Alignment:PtrUInt; Affinity:LongWord):Pointer;
Description: Allocate and clear a block of local memory aligned on a multiple of the alignment value
Alignment The alignment must be a multiple of the minimum alignment configuration


function ReAllocLocalMem(var Addr:Pointer; Size:PtrUInt; Affinity:LongWord):Pointer;
Description: Reallocate a block of local memory
Note To be documented


function ReAllocLocalAlignedMem(var Addr:Pointer; Size,Alignment:PtrUInt; Affinity:LongWord):Pointer;
Description: Reallocate a block of local memory aligned on a multiple of the alignment value
Alignment The alignment must be a multiple of the minimum alignment configuration


function AllocCodeMem(Size:PtrUInt; Affinity:LongWord):Pointer;
Description: Allocate and clear a block of code memory
Note To be documented


function AllocCodeAlignedMem(Size,Alignment:PtrUInt; Affinity:LongWord):Pointer;
Description: Allocate and clear a block of code memory aligned on a multiple of the alignment value
Alignment The alignment must be a multiple of the minimum alignment configuration


function ReAllocCodeMem(var Addr:Pointer; Size:PtrUInt; Affinity:LongWord):Pointer;
Description: Reallocate a block of code memory
Note To be documented


function ReAllocCodeAlignedMem(var Addr:Pointer; Size,Alignment:PtrUInt; Affinity:LongWord):Pointer;
Description: Reallocate a block of code memory aligned on a multiple of the alignment value
Alignment The alignment must be a multiple of the minimum alignment configuration


function AllocDeviceMem(Size:PtrUInt):Pointer;
Description: Allocate and clear a block of device memory
Note To be documented


function AllocDeviceAlignedMem(Size,Alignment:PtrUInt):Pointer;
Description: Allocate and clear a block of device memory aligned on a multiple of the alignment value
Alignment The alignment must be a multiple of the minimum alignment configuration


function ReAllocDeviceMem(var Addr:Pointer; Size:PtrUInt):Pointer;
Description: Reallocate a block of device memory
Note To be documented


function ReAllocDeviceAlignedMem(var Addr:Pointer; Size,Alignment:PtrUInt):Pointer;
Description: Reallocate a block of device memory aligned on a multiple of the alignment value
Alignment The alignment must be a multiple of the minimum alignment configuration


function AllocNoCacheMem(Size:PtrUInt):Pointer;
Description: Allocate and clear a block of non cached memory
Note To be documented


function AllocNoCacheAlignedMem(Size,Alignment:PtrUInt):Pointer;
Description: Allocate and clear a block of non cached memory aligned on a multiple of the alignment value
Alignment The alignment must be a multiple of the minimum alignment configuration


function ReAllocNoCacheMem(var Addr:Pointer; Size:PtrUInt):Pointer;
Description: Reallocate a block of non cached memory
Note To be documented


function ReAllocNoCacheAlignedMem(var Addr:Pointer; Size,Alignment:PtrUInt):Pointer;
Description: Reallocate a block of non cached memory aligned on a multiple of the alignment value
Alignment The alignment must be a multiple of the minimum alignment configuration


function AllocNonSharedMem(Size:PtrUInt):Pointer;
Description: Allocate and clear a block of non shared memory
Note To be documented


function AllocNonSharedAlignedMem(Size,Alignment:PtrUInt):Pointer;
Description: Allocate and clear a block of non shared memory aligned on a multiple of the alignment value
Alignment The alignment must be a multiple of the minimum alignment configuration


function ReAllocNonSharedMem(var Addr:Pointer; Size:PtrUInt):Pointer;
Description: Reallocate a block of non shared memory
Note To be documented


function ReAllocNonSharedAlignedMem(var Addr:Pointer; Size,Alignment:PtrUInt):Pointer;
Description: Reallocate a block of non shared memory aligned on a multiple of the alignment value
Alignment The alignment must be a multiple of the minimum alignment configuration


function AllocIRQMem(Size:PtrUInt; Affinity:LongWord):Pointer;
Description: Allocate and clear a block of IRQ memory
Note The memory must be freed using FreeIRQMem


function AllocIRQAlignedMem(Size,Alignment:PtrUInt; Affinity:LongWord):Pointer;
Description: Allocate and clear a block of IRQ memory aligned on a multiple of the alignment value
Alignment The alignment must be a multiple of the minimum alignment configuration
Note The memory must be freed using FreeIRQMem


function ReAllocIRQMem(var Addr:Pointer; Size:PtrUInt; Affinity:LongWord):Pointer;
Description: Reallocate a block of IRQ memory
Note To be documented


function ReAllocIRQAlignedMem(var Addr:Pointer; Size,Alignment:PtrUInt; Affinity:LongWord):Pointer;
Description: Reallocate a block of IRQ memory aligned on a multiple of the alignment value
Alignment The alignment must be a multiple of the minimum alignment configuration


function AllocFIQMem(Size:PtrUInt; Affinity:LongWord):Pointer;
Description: Allocate and clear a block of FIQ memory
Note The memory must be freed using FreeFIQMem


function AllocFIQAlignedMem(Size,Alignment:PtrUInt; Affinity:LongWord):Pointer;
Description: Allocate and clear a block of FIQ memory aligned on a multiple of the alignment value
Alignment The alignment must be a multiple of the minimum alignment configuration
Note The memory must be freed using FreeFIQMem


function ReAllocFIQMem(var Addr:Pointer; Size:PtrUInt; Affinity:LongWord):Pointer;
Description: Reallocate a block of FIQ memory
Note To be documented


function ReAllocFIQAlignedMem(var Addr:Pointer; Size,Alignment:PtrUInt; Affinity:LongWord):Pointer;
Description: Reallocate a block of FIQ memory aligned on a multiple of the alignment value
Alignment The alignment must be a multiple of the minimum alignment configuration


function SizeIRQMem(Addr:Pointer):PtrUInt;
Description: Return the size of an allocated block of IRQ memory
Note To be documented


function SizeFIQMem(Addr:Pointer):PtrUInt;
Description: Return the size of an allocated block of FIQ memory
Note To be documented


function MemFlags(Addr:Pointer):LongWord;
Description: Return the flags of an allocated block of memory
Note To be documented


function MemFlagsIRQ(Addr:Pointer):LongWord;
Description: Return the flags of an allocated block of IRQ memory
Note To be documented


function MemFlagsFIQ(Addr:Pointer):LongWord;
Description: Return the flags of an allocated block of FIQ memory
Note To be documented


function GetHeapStatistics:THeapStatistics;
Description: Return detailed statistics for the heap manager
Note To be documented


function GetHeapBlockCount(State:LongWord):LongWord;
Description: Get the total number of current heap blocks based on state
Note To be documented


function GetHeapBlockCountEx(State,Flags,Affinity:LongWord):LongWord;
Description: Get the number of current heap blocks based on state, flags and affinity
Note This uses the block list (not the Free/Used/Small lists) in order to account for all blocks


function GetHeapBlockMin(State:LongWord):LongWord;
Description: Get the minimum size of current heap blocks based on state
Note To be documented


function GetHeapBlockMinEx(State,Flags,Affinity:LongWord):LongWord;
Description: Get the minimum size of current heap blocks based on state, flags and affinity
Note This uses the block list (not the Free/Used/Small lists) in order to account for all blocks


function GetHeapBlockMax(State:LongWord):LongWord;
Description: Get the maximum size of current heap blocks based on state
Note To be documented


function GetHeapBlockMaxEx(State,Flags,Affinity:LongWord):LongWord;
Description: Get the maximum size of current heap blocks based on state, flags and affinity
Note This uses the block list (not the Free/Used/Small lists) in order to account for all blocks


function CreateHeapSnapshot(State:LongWord):PHeapSnapshot;
Description: To be documented
Note To be documented


function CreateHeapSnapshotEx(State,Flags,Affinity:LongWord):PHeapSnapshot;
Description: To be documented
Note To be documented


function DestroyHeapSnapshot(Snapshot:PHeapSnapshot):LongWord;
Description: To be documented
Note To be documented


Internal functions

function GetHeapBlock(Address:Pointer):PHeapBlock;
Description: Get the Heap Block referenced by Address
Note Address has already been normalized to include the Heap Block. Caller must hold the heap lock.


function FindHeapBlock(Address:Pointer; Size:PtrUInt):PHeapBlock;
Description: Find the Heap Block containing Address up to the Size specified
Note Address has already been normalized to include the Heap Block. Caller must hold the heap lock.


function AddHeapBlock(Block:PHeapBlock):Boolean;
Description: Add a heap block, sorted by ascending Address order
Note Caller must hold the heap lock


function SplitHeapBlock(Block:PHeapBlock; Size:PtrUInt):PHeapBlock;
Description: Split a heap block at the size indicated
Return Return The return is the split portion of the block
Note Caller must remove block from the free list. Caller must add split block to the free list. Caller must hold the heap lock.


function MergeHeapBlock(Block:PHeapBlock):PHeapBlock;
Description: Merge a heap block with Prev or Next blocks if free
Return The return is the merged result of the blocks
Note Caller must remove block from the free list. Caller must add merged block to the free list. Caller must hold the heap lock.


function GetFreeBlock(Size:PtrUInt):PHeapBlock;
Description: Get a free block of at least the size indicated
Size The size has already been normalized to alignment and includes the size of the Heap Block
Note Caller must hold the heap lock


function GetFreeBlockEx(Size:PtrUInt; Flags,Affinity:LongWord):PHeapBlock;
Description: Get a free block of at least the size indicated with the flags and affinity requested
Size The size has already been normalized to alignment and includes the size of the Heap Block
Note Caller must hold the heap lock


function FindFreeBlock(Size:PtrUInt):PHeapBlock;
Description: Find a free block of at least the size indicated with no flags or affinity which is alignable to the HEAP_REQUEST_ALIGNMENT value
Size The size is the exact size and has not been normalized
Note Caller must hold the heap lock


function AddFreeBlock(Block:PHeapBlock):Boolean;
Description: Add a free block, sorted by ascending Size order
Note Caller must hold the heap lock


function RemoveFreeBlock(Block:PHeapBlock):Boolean;
Description: Remove a free block
Note Caller must hold the heap lock


function GetUsedBlock(Address:Pointer):PHeapBlock;
Description: Get a used block by address
Address The address has already been normalized to include the Heap Block
Note Caller must hold the heap lock


function CheckUsedBlock(Address:Pointer):Boolean;
Description: Check a used block by address
Address The address has already been normalized to include the Heap Block
Note Caller must hold the heap lock


function AddUsedBlock(Block:PHeapBlock):Boolean;
Description: Add a used block
Note Caller must hold the heap lock


function RemoveUsedBlock(Block:PHeapBlock):Boolean;
Description: Remove a used block
Note Caller must hold the heap lock


function GetIRQBlock(Address:Pointer):PHeapBlock;
Description: Get the IRQ Heap Block referenced by Address
Address The address has already been normalized to include the IRQ Heap Block
Note Caller must hold the IRQ heap lock


function CheckIRQBlock(Address:Pointer):Boolean;
Description: Check the IRQ Heap Block referenced by Address
Address The address has already been normalized to include the IRQ Heap Block
Note Caller must hold the IRQ heap lock


function AddIRQBlock(Block:PHeapBlock):Boolean;
Description: Add an IRQ heap block, sorted by ascending Address order
Note Caller must hold the IRQ heap lock


function SplitIRQBlock(Block:PHeapBlock; Size:PtrUInt):PHeapBlock;
Description: Split an IRQ heap block at the size indicated
Return The return is the split portion of the block
Note Caller must remove block from the IRQ free list. Caller must add split block to the IRQ free list. Caller must hold the IRQ heap lock.


function MergeIRQBlock(Block:PHeapBlock):PHeapBlock;
Description: Merge an IRQ heap block with Prev or Next blocks if free
Return The return is the merged result of the blocks
Note Caller must remove block from the IRQ free list. Caller must add merged block to the IRQ free list. Caller must hold the IRQ heap lock.


function GetFreeIRQBlock(Size:PtrUInt; Affinity:LongWord):PHeapBlock;
Description: Get a free IRQ block of at least the size indicated
Size The size has already been normalized to alignment and includes the size of the IRQ Heap Block
Note Caller must hold the IRQ heap lock


function AddFreeIRQBlock(Block:PHeapBlock):Boolean;
Description: Add a free IRQ block, sorted by ascending Size order
Note Caller must hold the IRQ heap lock


function RemoveFreeIRQBlock(Block:PHeapBlock):Boolean;
Description: Remove a free IRQ block
Note Caller must hold the IRQ heap lock


function GetFIQBlock(Address:Pointer):PHeapBlock;
Description: Get the FIQ Heap Block referenced by Address
Address The address has already been normalized to include the FIQ Heap Block
Note Caller must hold the FIQ heap lock


function CheckFIQBlock(Address:Pointer):Boolean;
Description: Check the FIQ Heap Block referenced by Address
Address The address has already been normalized to include the FIQ Heap Block
Note Caller must hold the FIQ heap lock


function AddFIQBlock(Block:PHeapBlock):Boolean;
Description: Add an FIQ heap block, sorted by ascending Address order
Note Caller must hold the FIQ heap lock


function SplitFIQBlock(Block:PHeapBlock; Size:PtrUInt):PHeapBlock;
Description: Split an FIQ heap block at the size indicated
Return The return is the split portion of the block
Note Caller must remove block from the FIQ free list. Caller must add split block to the FIQ free list. Caller must hold the FIQ heap lock.


function MergeFIQBlock(Block:PHeapBlock):PHeapBlock;
Description: Merge an FIQ heap block with Prev or Next blocks if free
Return The return is the merged result of the blocks
Note Caller must remove block from the FIQ free list. Caller must add merged block to the FIQ free list. Caller must hold the FIQ heap lock.


function GetFreeFIQBlock(Size:PtrUInt; Affinity:LongWord):PHeapBlock;
Description: Get a free FIQ block of at least the size indicated
Size The size has already been normalized to alignment and includes the size of the FIQ Heap Block
Note Caller must hold the FIQ heap lock


function AddFreeFIQBlock(Block:PHeapBlock):Boolean;
Description: Add a free FIQ block, sorted by ascending Size order
Note Caller must hold the FIQ heap lock


function RemoveFreeFIQBlock(Block:PHeapBlock):Boolean;
Description: Remove a free FIQ block
Note Caller must hold the FIQ heap lock



Return to Unit Reference