소스 검색

Print the amount of memory allocated using k/M/G bytes

master
Ian Piumarta 4 년 전
부모
커밋
3886b9c623
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. +4
    -1
      parse.leg

+ 4
- 1
parse.leg 파일 보기

@ -1988,7 +1988,10 @@ int main(int argc, char **argv)
readEvalPrint(globals, NULL);
}
printf("[GC: %lli bytes allocated]\n", nalloc);
if (nalloc < 1024) printf("[GC: %lli bytes allocated]\n", nalloc );
else if (nalloc < 1024*1024) printf("[GC: %lli kB allocated]\n", nalloc / 1024 );
else if (nalloc < 1024*1024*1024) printf("[GC: %.2f MB allocated]\n", (double)nalloc / ( 1024*1024));
else printf("[GC: %.2f GB allocated]\n", (double)nalloc / (1024*1024*1024));
return 0;

불러오는 중...
취소
저장