[Select]

Dynamic Areas


Index

 

Sparse Dynamic Areas

Sparse dynamic areas are dynamic areas whose memory allocation is not linear from the base of the area. Such regions might be used to release memory back to the RISC OS pool or to provide a virtual memory implementation. The Sparse dynamic areas are created with bit 10 set. Subsequently they should be resized by the SparseClaim and SparseRelease reason codes.

OS_DynamicArea SparseClaim (9)

Ensure region of sparse dynamic area is mapped to valid memory

On entry
   R0 = 9
   R1 = area number
   R2 = base of region to claim
   R3 = size of region
On exit
   R0-R3 preserved

This SWI is used to claim an area of a Sparse Dynamic Area for use by the client. The size requested will be rounded up to a page. If not all of the region can be mapped in, an error will occur.

OS_DynamicArea SparseRelease (10)

Allow region of sparse dynamic area to release memory to free pool

On entry
   R0 = 10
   R1 = area number
   R2 = base of region to release
   R3 = size of region
On exit
   R0-R3 preserved

This SWI is used to release areas of memory previously claimed back in to the free pool, unmapping the area requested. If not all of the region can be released, an error will occur.


This documentation is copyright 3QD Developments Ltd 2013 and may not be reproduced or published in any form without the copyright holders permission. RISC OS is subject to continuous development and improvement as such all information is reproduced by 3QD Developments Ltd in good faith and is believed to be correct at the time of publication E&OE. 3QD Developments Ltd cannot accept any liability for any loss or damage arising from the use of any information provided as part of the RISC OS Documentation.

HTML document version 1.03 3rd November 2015