This trap returns part of an allocation to the common heap. See MT_ALCHP.
Call Parameters | Return Parameters | ||
---|---|---|---|
D0.B | $38 | D0.L | Error return. |
D1.L | New size required. | D1.L | New size allocated. |
D2.L | Unused. | D2.L | Corrupted. |
D3.L | Unused. | D3.L | Corrupted. |
A0.L | Base address of area. | A0.L | Preserved. |
A1.L | Unused. | A1.L | Corrupted. |
A2.L | Unused. | A2.L | Corrupted. |
A3.L | Unused. | A3.L | Corrupted. |
ERR_NJ | Invalid Job. |
The example below shows an allocation being reduced to $800 bytes. It is assumed that A0.L contains the address of the original allocation.
alloc moveq #$38,d0 ; SMS_SCHP move.l #$800,d1 ; New allocation trap #1 ; Reduce the allocation ... ; Do something here.