use memchecker.c

This commit is contained in:
lyon 2021-08-24 14:45:36 +08:00
parent 2cf6013354
commit bcb43e5e7c
2 changed files with 17 additions and 14 deletions

View File

@ -0,0 +1,17 @@
#include "dataStrs.h"
#include "BaseObj.h"
void PikaStdLib_MemChecker_max(PikaObj *self)
{
printf("%0.2f kB", pikaMemMax() / 1024.0);
}
void PikaStdLib_MemChecker_now(PikaObj *self)
{
printf("%0.2f kB", pikaMemNow() / 1024.0);
}
void PikaStdLib_MemChecker_resetMax(PikaObj *self)
{
pikaMemMaxReset();
}

View File

@ -113,17 +113,3 @@ void PikaStdLib_SysObj_type(PikaObj *self, char *argPath)
obj_setSysOut(self, arg_getType(arg));
}
void PikaStdLib_MemChecker_max(PikaObj *self)
{
printf("%0.2f kB", pikaMemMax() / 1024.0);
}
void PikaStdLib_MemChecker_now(PikaObj *self)
{
printf("%0.2f kB", pikaMemNow() / 1024.0);
}
void PikaStdLib_MemChecker_resetMax(PikaObj *self)
{
pikaMemMaxReset();
}