Showing changes from revision #5 to #6:
Added | Removed | Changed
Entry | |
---|---|
R0 | Required amount of memory to change application space (signed value) |
R1 | 17 (&11) |
R2 | Current Active Object pointer (CAO) |
Exit | |
---|---|
R1 | Value of 0 prevents re-mapping taking place |
Note that while R0 is intended to carry a signed value, the OS_ChangeDynamicArea actually gives a positive amount when it is trying to shrink the application space. Therefore it is not possible currently for a module to always guard against losing its app slot.
This call is used when the contents-addressable memory in the memory controller is about to be re-mapped, which alters the memory map of the system. This call should be claimed if re-mapping should not take place.
A module will be initially provided the current slot size for its application workspace (beginning at &8000). However, modules do not generally need this area, as they use RMA memory instead. Therefore, when an application calls Wimp_Initialise, the Wimp inspects the CAO, and if the value is within application workspace the Wimp does nothing. If, however, the CAO is outwith application workspace, then the Wimp will reduce the current slot size to zero automatically.
Some modules, e.g. BASIC, do require application workspace, and therefore the Wimp uses this call just before returning the application to its free pool.
RISC OS 5.24 & 5.26 contain a bug which will cause the sign of R0 to be lost when OS_ChangeDynamicArea is used to resize application space while the Wimp is inactive; application space shrinks will be reported as if they were a grow operation.