Showing changes from revision #2 to #3:
Added | Removed | Changed
The memory limit environment handler is not a code entry point. Instead, the value specified in R1 to OS_ChangeEnvironment is used to set a soft limit on how much memory an application can use from application space.
The limit set here is the same value as the RAM limit that OS_GetEnv returns in R1.
The limit should be specified as an absolute address (i.e. &8000 would correspond to 0 bytes of application space), and must be less than the limit set by the Application Space Handler.
When a program spawns a child, e.g. as a result of system()
from a C program, the memory limit is often used in order to prevent the child from overwriting the parent. parent (assuming the parent has relocated itself to the top of the allocated application space). However setting a memory limit will usually prevent the child from automatically resizing application space, e.g. if the child is a Wimp task thenWimp_SlotSize will does not allow its resizing of a tasks wimpslot to if be the resized. soft memory limit does not match theactual limit.