| cvs.gedasymbols.org/djgpp/doc/libc/libc_415.html | search | 
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] | 
#include <sys/resource.h> int getrlimit (int rltype, struct rlimit *rlimitp);  | 
This function gets the resource limit specified by rltype and
stores it in the buffer pointed to by rlimitp.  The rlimit
structure is defined on `sys/resource.h' as follows:
struct rlimit {
  long rlim_cur;  /* current (soft) limit */
  long rlim_max;  /* maximum value for rlim_cur */
};
 | 
The following resource types can be passed in rltype:
RLIMIT_CPU
RLIMIT_FSIZE
RLIMIT_DATA
RLIMIT_STACK
RLIMIT_CORE
RLIMIT_RSS
RLIMIT_MEMLOCK
RLIMIT_NPROC
RLIMIT_NOFILE
Currently, only the RLIMIT_STACK and RLIMIT_NOFILE are
meaningful: the first returns the value of _stklen
(see section _stklen), the second the value returned by
sysconf(_SC_OPEN_MAX) (see section sysconf).  All other members of
the rlimit structure are set to RLIM_INFINITY, defined in
`sys/resource.h' as 2^31 - 1.
Zero on success, nonzero on failure.
| ANSI/ISO C | No | 
| POSIX | No | 
struct rlimit rlimitbuf; int rc = getrlimit (RLIMIT_STACK, &rlimitbuf);  | 
| webmaster | delorie software privacy | 
| Copyright © 2004 | Updated Apr 2004 |