Hi,
is there a way to turn off FAST memory so the system can't allocate it any more apart from this very common technique?
Code:
CNOP 0,4
rd_turn_off_FAST_memory
move.l #MEMF_FAST+MEMF_LARGEST,d1 ;Get largest FAST-memory block
jsr -216(a6) ;AvailMem()
tst.l d0 ;Still FAST memory ?
beq.s rd_no_more_FAST_memory ;No -> skip
move.l #MEMF_FAST+MEMF_LARGEST,d1 ;Get largest FAST-memory block
jsr -198(a6) ;AllocMem()
bra.s rd_turn_off_FAST_memory ;Loop
CNOP 0,4
rd_no_more_FAST_memory
rts
If I do it this way, it's a one-way street. The FAST memory is irreversible lost. I want a solution like NoFastMem of the WB 1.2/1.3 does. Switching FAST memory off and on again.
Does anyone know a smarter way in assembler?