AcornSearch - Acorn and RISC OS information searching
RISC OS Search
containing
"Nutty quip goes here!"
Home  |  About  |  Filebase Archive  |  StrongHelp Manuals  |  Newsgroups  |  Module Database
R0 = Reason code
other registers as appropriate for reason code

The following heap operations are available:-

Initialise heap 
Describe heap   
Allocate block  
Free block      
Reallocate block
Tidy heap       
Compact heap    
Find anchor     
Fix blocks      
Smash blocks    
Unfix blocks    
Increase anchors
Allocate+anchor 
Free all blocks 
Select heap     
Relocate heap   
Heap in a block 

This SWI provides access to a heap management system. Access to blocks
is provided via 'anchors'. When calling WimpExt_Heap routines, you can
either refer to a block by a pointer to it, or by a pointer to its
anchor. I will refer to this as a 'block pointer'. The anchor contains
the address of the block. This address may change on calls to
WimpExt_Heap as the blocks are shuffled around, but the anchor will
always stay fixed. The size of the block is stored 4 bytes before the
start of the block.
eg. to find the size of a block from its anchor:
size%=!((!anchor%)-4)

All these calls can return the errors 'Heap corrupt' or 'Bad heap
operation'. All the calls act on the currently selected heap. The heap
can be selected using R0=14.

[sh-index] Back to list of manuals