What does “ulimit -s unlimited” do?

When you call a function, a new “namespace” is allocated on the stack. That’s how functions can have local variables. As functions call functions, which in turn call functions, we keep allocating more and more space on the stack to maintain this deep hierarchy of namespaces. To curb programs using massive amounts of stack space, … Read more

How to limit memory of a OS X program? ulimit -v neither -m are working

You can’t. Apple can (using the ledger() system call, which is private), but you can’t. I’m not entirely sure whether launchd’s options work or not – certainly if it was still using the code visible in the last open source version (from 10.9.5), it wouldn’t, because it calls setrlimit(), but it’s been substantially rewritten since … Read more