Showing changes from revision #0 to #1:
Added | Removed | Changed
Entry | |
---|---|
R0 | 8 |
R1 | Pointer to heap |
R2 | Required alignment, 0 for none |
R3 | Size to claim |
R4 | Required boundary, 0 for none |
R5 | Address to align relative to |
Exit | |
---|---|
R0 | Preserved |
R1 | Preserved |
R2 | Pointer to block, or 0 if failed |
R3 | Preserved |
R4 | Preserved |
R5 | Preserved |
The purpose of this call is to claim an aligned section of the heap. Its operation is the same as OS_Heap 7, with the exception that the alignment and boundary calculations are performed as if the heap base address was R5, not R1. E.g. the returned pointer will satisfy the rule that (R2-R1+R5) MOD alignment = 0
. Calling with R5=R1 will result in the same behaviour as OS_Heap 7.
Alignment and boundary values must be powers of two. The boundary value, if specified, must be greater than or equal to the block size.
If a block is resized using OS_Heap 4, there is no guarantee that the updated block will satisfy the original alignment and boundary constraints.
This reason code first became available in RISC OS 5.27