2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
6 #include "sysmon_intern.h"
8 #include <clib/alib_protos.h>
10 /* Memory functions */
11 static BOOL
InitMemory(struct SysMonData
*smdata
)
16 static VOID
DeInitMemory(struct SysMonData
*smdata
)
20 VOID
UpdateMemoryStaticInformation(struct SysMonData
* smdata
)
22 TEXT buffer
[64] = {0};
26 size
= AvailMem(MEMF_ANY
| MEMF_TOTAL
) / 1024;
27 __sprintf(buffer
, "%ld kB", size
);
28 set(smdata
->memorysize
[MEMORY_RAM
], MUIA_Text_Contents
, buffer
);
30 size
= AvailMem(MEMF_CHIP
| MEMF_TOTAL
) / 1024;
31 __sprintf(buffer
, "%ld kB", size
);
32 set(smdata
->memorysize
[MEMORY_CHIP
], MUIA_Text_Contents
, buffer
);
34 size
= AvailMem(MEMF_FAST
| MEMF_TOTAL
) / 1024;
35 __sprintf(buffer
, "%ld kB", size
);
36 set(smdata
->memorysize
[MEMORY_FAST
], MUIA_Text_Contents
, buffer
);
39 VOID
UpdateMemoryInformation(struct SysMonData
* smdata
)
41 TEXT buffer
[64] = {0};
45 size
= AvailMem(MEMF_ANY
) / 1024;
46 __sprintf(buffer
, "%ld kB", size
);
47 set(smdata
->memoryfree
[MEMORY_RAM
], MUIA_Text_Contents
, buffer
);
49 size
= AvailMem(MEMF_CHIP
) / 1024;
50 __sprintf(buffer
, "%ld kB", size
);
51 set(smdata
->memoryfree
[MEMORY_CHIP
], MUIA_Text_Contents
, buffer
);
53 size
= AvailMem(MEMF_FAST
) / 1024;
54 __sprintf(buffer
, "%ld kB", size
);
55 set(smdata
->memoryfree
[MEMORY_FAST
], MUIA_Text_Contents
, buffer
);
58 struct SysMonModule memorymodule
=
61 .DeInit
= DeInitMemory
,