Back to index

plt-scheme  4.2.1
Typedefs | Functions
rlimit_heapsize.c File Reference
#include <sys/time.h>
#include <sys/resource.h>
#include <unistd.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


typedef unsigned long size_type


static size_type determine_max_heap_size (void)

Typedef Documentation

typedef unsigned long size_type

Definition at line 7 of file rlimit_heapsize.c.

Function Documentation

static size_type determine_max_heap_size ( void  ) [static]

Definition at line 9 of file rlimit_heapsize.c.

  struct rlimit rlim;

# ifdef OS_X
  getrlimit(RLIMIT_RSS, &rlim);
# else  
  getrlimit(RLIMIT_DATA, &rlim);
# endif

  return (rlim.rlim_cur == RLIM_INFINITY) ? (unsigned long)-1 : rlim.rlim_cur;

Here is the caller graph for this function: