Showing changes from revision #7 to #8:
Added | Removed | Changed
Bit | Meaning | OS version | Notes |
---|---|---|---|
0-3 | Access privileges to be given to each page in the area | Arthur | |
4 | 1 = area is not bufferable by chips | 3.50 | 1 |
5 | 1 = area is not cacheable by chips | 3.50 | 1 |
6 | 1 = area is doubly mapped (reserved, OS use only), else singly mapped | 3.50 | |
7 | 0 = area may be dragged by the user in Task Manager window (has red bar) | 3.50 | |
1 = area may not be dragged by the user in Task Manager window (has green bar) | 3.50 | ||
8 | 0 = area does not require specific physical pages (ie R1 is undefined on entry to the PreGrow and PostGrow handlers) | 3.50 | |
1 = area may require specific physical pages (ie R1 points at a page block on entry to the PreGrow and PostGrow handlers) | 3.50 | ||
9 | 1 = area is Shrinkable | 3.80 | |
10 | 1 = area is Sparse | 3.80 | |
11 | 1 = area is bound to client application | 3.80 | 4 |
12-14 | Cache policy (RISC OS 5) | 5.00 | 5 |
15 | 1 = area should only allocate from DMA capable memory (RISC OS 5) | 5.19 | 3 5 |
Reserved (must be zero) | 6 | ||
b12-19 usage in other versions (OS_Byte 129 (OS) is not &AA) | |||
12 | 1 = area should only allocate from DMA capable memory (RISCOS Ltd DMAableDAs) | 4.04 | 3 5 |
13 | 1 = area is locked (RISCOS Ltd LockedDAs) | Select only | 5 |
14 | 1 = area is a heap area (RISCOS Ltd HeapDAs) | Select only | 5 |
15 | 1 = area requires specific physical pages (RISCOS Ltd PhysicalDAs) | Select only | 5 |
1 = area is abortable (aborts within its extent will be reported through the Dynamic Area handler) (RISCOS Ltd AbortableDAs) | Select only | 6 | |
16 | 1 = area is Abortable (aborts within its extent will be reported through the Dynamic Area handler) (RISCOS Ltd AbortableDAs) | Select, 5.29+ | |
17 | 1 = area uses domain-based memory protection (RISCOS Ltd DomainDAs) | Select only | 6 |
18 | 1 = area is not user visible (RISCOS Ltd InvisibleDAs) | Select only | 6 |
19 | 1 = area area supplies a fixed list of pages (RISCOS Ltd FixedPageDAs) | Select only | 6 |
Common to all OS versions | |||
20 | 1 = area is a Physical Memory Pool | 5.23 | |
21-30 | Reserved (must be zero) | ||
31 | 1 = Virtual memory is active for dynamic area | !Virtualise | 2 |
Many of these flags correspond directly to the Memory Page Access Flags that can be read and written via the OS_SetMemMapEntries group of SWIs.
1 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.
2 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. Note: This feature is not implemented by the OS and requires third-party software to function.
3 DMA
Under RISC OS 5, setting bit 15 will cause the OS to ignore any PreGrow handler specified by the user and instead use a routine which only allocates from DMA capable memory. The memory is not guaranteed to be physically contiguous – if physical contiguity is required, consider using OS_Memory 12 with bit 8 of R0 set from within a PreGrow handler, or use PCI_RAMAlloc.
This same functionality is available under ROL’s OS (from RISC OS 4.04 onwards), but requires you to set bit 12 of the flags, not bit 15. Be aware of this difference when writing software targeting both OS versions.
4 Binding areas to applications
Although a flag bit is reserved for this, support for the feature has not been implemented under any OS version.
5 Inconsistent use of flags between RISC OS 5 and RISC OS Select API.
Be aware of this difference when writing software targeting both OS versions.
6 Introduced in RISC OS Select but not currently supported in RISC OS 5.