From: Alex Rothbard Date: 2012-02-01T18:05:37+09:00 Subject: stack level too deep (SystemStackError) Hello. If I execute the following code: ruby -e 'def t(i) p i;t(i+1) end;t 0' I get this: ... 8730 8731 -e:1: stack level too deep (SystemStackError) Alright, that seems normal. My ulimit settings are as follows: socket buffer size (bytes, -b) unlimited core file size (blocks, -c) unlimited data seg size (kbytes, -d) 33554432 file size (blocks, -f) unlimited max locked memory (kbytes, -l) unlimited max memory size (kbytes, -m) unlimited open files (-n) 11095 pipe size (512 bytes, -p) 1 stack size (kbytes, -s) 524288 cpu time (seconds, -t) unlimited max user processes (-u) 5547 virtual memory (kbytes, -v) unlimited swap size (kbytes, -w) unlimited So, in theory if I *reduce* the stack size, the above number should go down, right? That's not what happens. I tried reducing the stack size from 512MB to 24KB, but I am still able to get 8731 iterations. Does anyone know why? -- Posted via http://www.ruby-forum.com/.