src/resources.cpp
// This seems to work on Linux (man page says since Linux 2.6.32).
This seems to work on Linux (man page says since Linux 2.6.32).
This seems to work on Linux ( man page says since Linux 2 . 6 . 32 ) .
size_t maximum_resident_set_size () {
  struct rusage u;
  if (getrusage (RUSAGE_SELF, &u)) return 0;
  return ((size_t) u.ru_maxrss) << 10;
}
size_t maximum_resident_set_size ( ) { struct rusage u ; if ( getrusage ( RUSAGE_SELF , & u ) ) return 0 ; return ( ( size_t ) u . ru_maxrss ) << 10 ; }
This seems to work on Linux (man page says since Linux 2.6.32).
This seems to work on Linux ( man page says since Linux 2 . 6 . 32 ) .