Showing changes from revision #1 to #2:
Added | Removed | Changed
Entry | |
---|---|
R0 | 26 (reason code) |
R1 | New address boundary between application space and dynamic areas, or 0 to read |
Exit | |
---|---|
R0 | Preserved |
R1 | Previous address boundary |
RISC OS 5 has hard a boundary between application space and dynamic areas. Application space cannot extend above the boundary address, and dynamic areas cannot be placed below it. Traditionally the boundary address is fixed at ROM compile time, but this call allows it to be moved at runtime, giving users and programs more control over the memory map. E.g. compatibility aid software which wants to mimic the memory map used by 26bit versions of RISC OS can use this call to lower the limit, allowing the creation of dynamic areas at 26bit-era addresses.
A “Bad parameters” error (&1EA) will be returned if the provided address is outside the compile-time limits supported by the kernel. An “Overlapping areas” error (&1C6) will be returned if the address is within the compile-time limits, but conflicts with memory/address space reserved by an existing application or dynamic area.
Note that OS_DynamicArea 0 will prefer to place dynamic areas at the lowest possible free address. Thus care should be taken if software wants to be able to lower the limit and then raise it again at a later date. E.g. the software could create “filler” dynamic areas which will reserve all the free space, and then kill those dynamic areas just before it restores the application space limit.
Any adjustment to the boundary will be reflected in the R2 value returned by OS_ReadDynamicArea when inspecting application space (area -1).
This call was introduced in RISC OS 5.27