#include #include int main() { struct rusage r_usage; getrusage(RUSAGE_SELF, &r_usage); printf("Memory usage: %ld kilobytes\n", r_usage.ru_maxrss); return 0; }