m68k-amiga: Cleanup gdbstop, add FlushMem
[AROS.git] / arch / m68k-amiga / c / FlushMem.c
blob598962499dfd1d8f1e99e39ae97121a6ae545dcd
1 #include <proto/dos.h>
2 #include <proto/exec.h>
4 #include <aros/shcommands.h>
6 #define BUG(x) do { const char *cp = x; while (*cp) { RawPutChar(*cp); cp++; } } while (0)
8 void flushall(struct ExecBase *SysBase)
10 APTR ptr;
11 ptr = AllocMem(0x7fffffff, MEMF_ANY);
12 if (ptr) {
13 flushall(SysBase);
14 FreeMem(ptr, 0x7fffffff);
18 AROS_SH0H(FlushMem, 1.0, "Flush all expungable memory")
20 AROS_SHCOMMAND_INIT
22 BUG("---- FlushMem: Begin\n");
23 flushall(SysBase);
24 BUG("---- FlushMem: End\n");
25 return RETURN_OK;
27 AROS_SHCOMMAND_EXIT