The page access flags used below are used by the OS_DynamicArea, OS_Memory, and the OS_SetMemMapEntries group of SWIs. However, when using calls to modify the access of pages, be aware that not all APIs support all types of flags. Specifying an unsupported flag can lead to malfunction.
Bit | Meaning | Notes |
---|---|---|
0-3 | Access privileges to be given to each page in the area (same format as for OS_ReadMemMapEntries) | |
4 | Set if area is not bufferable by chips | 3 |
5 | Set if area is not cacheable by chips | 3 |
6 | If set, area is doubly mapped (reserved, OS use only), otherwise area is singly mapped | |
7 | 0 =>area may be dragged by the user in Task Manager window (has red bar) | |
1 =>area may not be dragged by the user in Task Manager window (has green bar) | ||
8 | 0 =>area does not require specific physical pages (ie R1 is undefined on entry to the PreGrow and PostGrow handlers) | |
1 =>area may require specific physical pages (ie R1 points at a page block on entry to the PreGrow and PostGrow handlers) | ||
9 | 1 =>area is Shrinkable | 1 |
10 | 1 =>area is Sparse | 1 |
11 | 1 =>area is bound? to client application | 1 |
12-14 | Cache policy | 2 |
15-30 | Reserved (must be zero) | |
31 | Virtual memory is active for dynamic area | 4 |
1 Only available on RISC OS 3.80 onwards.
2 Only available on RISC OS 5.
3 Advice on bits 4 & 5
Setting flags such that r4 bit 4 is 1 and bit 5 is 0 (area is cacheable but not bufferable) has different meanings depending on the operating system version. On RISC OS 5 it selects a non-merging write-through or write-back cache policy. On other operating system versions it is unsupported and must not be used.
4 Virtual memory
If bit 31 is set when the dynamic area is created then virtual memory is activated immediately. Note that no error is produced if it is not possible to start virtual memory for the new dynamic area