Upon starting a command, I get an error message about insufficient memory. What’s wrong?

If the error message is of the form

10330:/path/to/application: /sbin/loader: Fatal Error: Insufficient memory to execute program

or similar, and you are sure that the application you are trying to start isn’t simply too large for the machine you are working on, then you will have to increase your resource limits.

Example, and most probable reason for the error message above: to increase the available stack size, called “data segment size”, which defaults to 128MB, to a value of 1GB, issue the command

ulimit -d 104856

The same applies for the heap size, where memory is allocated at run time to store matrices and vectors, for example. The heap size is called “max. memory size” and can be modified with ulimit -m.

For a complete description of the ulimit command, have a look at the ulimit manpage.