File: getrusage.c

package info (click to toggle)
python-libtrace 1.6%2Bgit20161027-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,124 kB
  • ctags: 1,357
  • sloc: ansic: 6,890; python: 3,228; makefile: 70; sh: 49
file content (11 lines) | stat: -rw-r--r-- 193 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11

// gcc -o getrusage getrusage.c -lproc

#include <stdio.h>
#include <proc/readproc.h>

int main() {
  struct proc_t usage;
  look_up_our_self(&usage);
  printf("usage: %lu\n", usage.vsize);
}