pikapython/package/PikaStdLib/PikaStdLib_MemChecker.c
李昂 5148412411 !24 support double in C Module
* Merge branch 'master' into dev
* fix float->double for bytecodegen
* update to /package
* Use double in C for float in python
2022-06-13 10:02:59 +00:00

24 lines
563 B
C

#include "PikaStdLib_MemChecker.h"
#include "BaseObj.h"
#include "dataStrs.h"
void PikaStdLib_MemChecker_max(PikaObj* self) {
__platform_printf("%0.2f kB\r\n", pikaMemMax() / 1024.0);
}
void PikaStdLib_MemChecker_now(PikaObj* self) {
__platform_printf("%0.2f kB\r\n", pikaMemNow() / 1024.0);
}
void PikaStdLib_MemChecker_resetMax(PikaObj* self) {
pikaMemMaxReset();
}
double PikaStdLib_MemChecker_getMax(PikaObj* self) {
return pikaMemMax() / 1024.0;
}
double PikaStdLib_MemChecker_getNow(PikaObj* self) {
return pikaMemNow() / 1024.0;
}