6 typedef long long int ll_t;
10 #if defined(CRAY) && !defined(SV2) 13 #define gethwm gethwm_ 18 #if defined(__64BIT__) 21 #include <sys/procfs.h> 25 static int fd = -9999;
26 static char *heapbase = NULL;
33 sprintf(procfile,
"/proc/%d/status",pid);
34 fd = open(procfile, O_RDONLY);
35 if (read(fd, &pstatus,
sizeof(pstatus)) ==
sizeof(pstatus)) {
36 heapbase = (
char *)pstatus.pr_brkbase;
42 if (fd == 0 && heapbase != NULL) {
43 heapsize = (
ll_t)((
char *)sbrk(0) - heapbase);
100 ll_t rc = (
ll_t)((
char *)sbrk(0) - (
char *)0);
113 unsigned int sleep_(
unsigned int seconds)
115 return sleep(seconds);
int getstatm(struct statm *sm)
size_t get_tcmalloc_heap_size_()
unsigned int sleep_(unsigned int seconds)