MT_FREE/SMS.FRTP - Find Maximum Free Memory
Force remove an existing job. The job may be active, if so it will be rendered inactive and then removed.
|Call Parameters||Return Register||Return Parameter|
|D1.L||Unused||D1.L||Maximum free space in bytes.|
No errors are returned by this trap.
- All registers not shown above are not used on entry and are preserved on exit.
- This trap returns the number of bytes in the biggest free area of Transient Program space or the number of bytes between SV_BASIC and SV_FREE minus 512 - whichever is the biggest.
- Beware of the fact that by the time you have obtained the figure, you might still fail to allocate it all if another job has got there first and allocated some space for itself. LOL
The following shows the use of this call :
... mfree moveq #SMS.FRTP,d0 ; Or MT_FREE. trap #1 ; Find amount of free space ... <do stuff here with the number of bytes in D1.L> ...