Add tool 'krk-debug-stats' which prints basic sizes

This commit is contained in:
K. Lange 2021-03-29 09:26:13 +09:00
parent 9b6886096f
commit c7d14d0528

13
tools/debug-stats.c Normal file
View File

@ -0,0 +1,13 @@
#include <stdio.h>
#include <kuroko/kuroko.h>
#include <kuroko/vm.h>
int main(int argc, char *argv[]) {
fprintf(stderr, "sizeof(KrkValue) = %lld\n", (long long)sizeof(KrkValue));
fprintf(stderr, "alignof(KrkValue) = %lld\n", (long long)__alignof__(KrkValue));
fprintf(stderr, "sizeof(KrkObj) = %lld\n", (long long)sizeof(KrkObj));
fprintf(stderr, "alignof(KrkObj) = %lld\n", (long long)__alignof__(KrkObj));
return 0;
}