h6. [[OS_DynamicArea]] h6(. » OS_DynamicArea 2 h2. OS_DynamicArea 2 h5. (SWI &66) |_<^{width:3em}. Entry | | |<^. R0 |<^. 2 (reason code) | |<^. R1 |<^. [[Dynamic Area Numbers|Area number]] | |_<^{width:3em}. Exit | | |<^. R0 |<^. Preserved | |<^. R1 |<^. Preserved | |<^. R2 |<^. Current size of area, in bytes | |<^. R3 |<^. Base logical address of area | |<^. R4 |<^. [[Dynamic Area Flags|Area flags]] | |<^. R5 |<^. Maximum size of area in bytes | |<^. R6 |<^. Pointer to [[Dynamic Area Handler Code|dynamic area handler routine]], or 0 if no routine | |<^. R7 |<^. Pointer to workspace for handler | |<^. R8 |<^. Pointer to name of area | h4. Use The purpose of this call is to return information relating to a dynamic area. h4. Notes For doubly-mapped areas, R3 on exit from this call returns the address of the boundary between the first and second copies of the area, whereas [[OS_ReadDynamicArea]] returns the start address of the first copy (i.e. the lowest valid address in the area). For [[Sparse Dynamic Areas]], the current size is calculated from the number of pages that are currently mapped in. Therefore it is not guaranteed to describe the logical extent of the area. For [[Physical Memory Pool]] DAs, the values in R2 and R5 will correspond to the physical properties of the dynamic area, not the logical properties. Therefore the values are completely unrelated to the base address returned in R3 (and if an area has a maximum logical size of zero, the base address will be zero). If necessary the values will be clamped at 2GB-PageSize in order to try and avoid any issues relating to signed number overflow. To be able to query a PMP without this clamping, or to be able to query the logical size values, [[OS_DynamicArea 24]] should be used. h4. See also * [[Dynamic Area Flags]] * [[Dynamic Area Handler Code]] * [[OS_DynamicArea]] * [[OS_DynamicArea 8]] * [[OS_DynamicArea 24]] * [[Sparse Dynamic Areas]] * [[Physical Memory Pool]]