2021-11-24 11:15:50 +08:00
|
|
|
#include "PikaStdLib_MemChecker.h"
|
2021-10-01 20:00:15 +08:00
|
|
|
#include "BaseObj.h"
|
|
|
|
#include "dataStrs.h"
|
|
|
|
|
|
|
|
void PikaStdLib_MemChecker_max(PikaObj* self) {
|
2022-01-23 22:53:27 +08:00
|
|
|
__platform_printf("%0.2f kB\r\n", pikaMemMax() / 1024.0);
|
2021-10-01 20:00:15 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void PikaStdLib_MemChecker_now(PikaObj* self) {
|
2022-01-23 22:53:27 +08:00
|
|
|
__platform_printf("%0.2f kB\r\n", pikaMemNow() / 1024.0);
|
2021-10-01 20:00:15 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void PikaStdLib_MemChecker_resetMax(PikaObj* self) {
|
|
|
|
pikaMemMaxReset();
|
|
|
|
}
|
2021-11-24 11:15:50 +08:00
|
|
|
|
2022-09-28 11:23:39 +08:00
|
|
|
pika_float PikaStdLib_MemChecker_getMax(PikaObj* self) {
|
2021-11-24 11:15:50 +08:00
|
|
|
return pikaMemMax() / 1024.0;
|
|
|
|
}
|
|
|
|
|
2022-09-28 11:23:39 +08:00
|
|
|
pika_float PikaStdLib_MemChecker_getNow(PikaObj* self) {
|
2021-11-24 11:15:50 +08:00
|
|
|
return pikaMemNow() / 1024.0;
|
2022-01-13 16:31:30 +08:00
|
|
|
}
|