#include"myHeader.h" main() { struct rlimit v,new; getrlimit(RLIMIT_STACK,&v); new=v; new.rlim_cur=2000; setrlimit(RLIMIT_STACK,&new); getrlimit(RLIMIT_STACK,&new); printf("new resource current limit address=%lu \n new resource maximum limit=%lu\n",new.rlim_cur,new.rlim_max); }OutPut:
madan@madan-Lenovo-G570:~/madan/osconcepts$ cc ex2.c madan@madan-Lenovo-G570:~/madan/osconcepts$ ./a.out new resource current limit address=2000 new resource maximum limit=18446744073709551615