-/*
- * get_vm_top - get the operating systems notion of the resident set size
- */
-static unsigned long
-get_vm_top(void)
-{
- /*
- * NOTE: sbrk is not part of the ANSI C library or the POSIX.1 standard
- * however it seems that everyone defines it. Calling sbrk with a 0
- * argument will return a pointer to the top of the process virtual
- * memory without changing the process size, so this call should be
- * reasonably safe (sbrk returns the new value for the top of memory).
- * This code relies on the notion that the address returned will be an
- * offset from 0 (NULL), so the result of sbrk is cast to a size_t and
- * returned. We really shouldn't be using it here but...
- */
- void *vptr = sbrk(0);
- return (unsigned long) vptr;
-}
-
-/*
- * get_maxrss - get the operating systems notion of the resident set size
- */
-unsigned long
-get_maxrss(void)
-{
- return get_vm_top() - initialVMTop;
-}