fork download
  1. #include <stdio.h>
  2. #include <sys/time.h>
  3. #include <sys/resource.h>
  4.  
  5. int main (void)
  6. {
  7. struct rlimit limit;
  8.  
  9. getrlimit (RLIMIT_STACK, &limit);
  10. printf ("\nStack Limit = %ld and %ld max\n", limit.rlim_cur, limit.rlim_max);
  11. }
Success #stdin #stdout 0.01s 1720KB
stdin
Standard input is empty
stdout
Stack Limit = 8388608 and -1 max