Difference between revisions of "Unit HeapManager"
From Ultibo.org
(Created page with "Return to Unit Reference === Description === ---- ''To be documented'' === Constants === ---- ''To be documented'' === Type definitions === ---- ''To...") |
|||
Line 25: | Line 25: | ||
---- | ---- | ||
− | ''To be documented'' | + | |
+ | '''Initialization 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;">procedure RegisterMemoryManager;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | To be documented | ||
+ | |- | ||
+ | |} | ||
+ | </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;">procedure RegisterHeapBlock(Address:Pointer; Size:PtrUInt);</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | To be documented | ||
+ | |- | ||
+ | |} | ||
+ | </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 RequestHeapBlock(Hint:Pointer; Size:PtrUInt; Flags,Affinity:LongWord):Pointer;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Request registration a Heap Block with specified flags and affinity within an existing block</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''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. | ||
+ | |- | ||
+ | |} | ||
+ | </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 RequestSharedHeapBlock(Hint:Pointer; Size:PtrUInt):Pointer;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Request registration of a Shared Heap Block within an existing block</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''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. | ||
+ | |- | ||
+ | |} | ||
+ | </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 RequestLocalHeapBlock(Hint:Pointer; Size:PtrUInt; Affinity:LongWord):Pointer;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Request registration of a Local Heap Block within an existing block</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''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. | ||
+ | |- | ||
+ | |} | ||
+ | </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 RequestCodeHeapBlock(Hint:Pointer; Size:PtrUInt; Affinity:LongWord):Pointer;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Request registration of a Code Heap Block within an existing block</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''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. | ||
+ | |- | ||
+ | |} | ||
+ | </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 RequestDeviceHeapBlock(Hint:Pointer; Size:PtrUInt):Pointer;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Request registration of a Device Heap Block within an existing block</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''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. | ||
+ | |- | ||
+ | |} | ||
+ | </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 RequestNoCacheHeapBlock(Hint:Pointer; Size:PtrUInt):Pointer;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Request registration of a Non Cached Heap Block within an existing block</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''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. | ||
+ | |- | ||
+ | |} | ||
+ | </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 RequestNonSharedHeapBlock(Hint:Pointer; Size:PtrUInt):Pointer;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Request registration of a Non Shared Heap Block within an existing block</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''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. | ||
+ | |- | ||
+ | |} | ||
+ | </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 RequestIRQHeapBlock(Hint:Pointer; Size:PtrUInt; Affinity:LongWord):Pointer;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Request registration of an IRQ Heap Block within an existing block</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''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. | ||
+ | |- | ||
+ | |} | ||
+ | </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 RequestFIQHeapBlock(Hint:Pointer; Size:PtrUInt; Affinity:LongWord):Pointer;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Request registration of an FIQ Heap Block within an existing block</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''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. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
Return to [[Unit_Reference|Unit Reference]] | Return to [[Unit_Reference|Unit Reference]] |
Revision as of 04:48, 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. |
Return to Unit Reference