12 lines
198 B
C
12 lines
198 B
C
|
#include <sys/resource.h>
|
||
|
#include <stdio.h>
|
||
|
|
||
|
int main() {
|
||
|
struct rusage r_usage;
|
||
|
getrusage(RUSAGE_SELF, &r_usage);
|
||
|
|
||
|
printf("Memory usage: %ld kilobytes\n", r_usage.ru_maxrss);
|
||
|
|
||
|
return 0;
|
||
|
}
|