Hi

I was getting segmentation fault in a simple program meant to recursively
calculate the factorial of a number (>5000). Some digging around revealed
that it was because the stack size was limited to 1 MB.
I added this to my /home/<username>/.bashrc
ulimit -s unlimited
and voila!! the program successfully calculated it upto 7000.

but after that it is getting bus error ... will get into that today.

link that helped me do it
http://tldp.org/LDP/solrhe/Securing-Optimizing-Linux-RH-Edition-v1.3/x4733.html

-- 
Anuvrat Parashar
3rd Year Undergraduate, CSE
ASET, Noida

President, ALiAS (Amity Linux Assistance Sapience)
Member, Digit Community Advisory Council

-- 
LUG@IITD - http://tinyurl.com/ycueutm

Reply via email to