6

When I try to extend the stack size on macOS Sierra using the command ulimit -s unlimited the terminal print the next message:

-bash: ulimit: stack size: cannot modify limit: Operation not permitted.

I also tried to use sudo ulimit -s unlimited but it doesn't leave me either. Anyone know something?

Pablo Aragonés
  • 361
  • 6
  • 16

1 Answers1

12

There is a hard limit for the stack size on OS X that can be seen running:

ulimit -Hs

This is the maximum you can set the stack size as. So instead of unlimited the best you can do is

ulimit -s 65532

See this question for more details.

Community
  • 1
  • 1
JamesFurness
  • 178
  • 1
  • 8