Source
int GPTLget_memusage (int *size, int *rss, int *share, int *text, int *datastack)
/*
** $Id: get_memusage.c,v 1.10 2010-11-09 19:08:53 rosinski Exp $
**
** Author: Jim Rosinski
** Credit to Chuck Bardeen for MACOS section (__APPLE__ ifdef)
**
** get_memusage:
**
** Designed to be called from Fortran, returns information about memory
** usage in each of 5 input int* args. On Linux read from the /proc
** filesystem because getrusage() returns placebos (zeros). Return -1 for
** values which are unavailable or ambiguous on a particular architecture.
**
** Return value: 0 = success
** -1 = failure
*/
/* _AIX is automatically defined when using the AIX C compilers */