getrlimit, setrlimit

Henry Cejtin henry@sourcelight.com
Mon, 9 Jul 2001 17:46:00 -0500


It  varies a bit with the kernel you are using.  For Sun's (which have better
man pages):

    RLIMIT_DATA controls heap memory (how much you can  get  with  the  brk()
        system call).

    RLIMIT_AS controls total memory (heap, and mmap and stack).

In  Linux  (2.4),  brk()  seems  to  check  against both while mmap() is only
against RLIMIT_AS.  The distinction is a bit silly, that's for sure.