Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a closed source software with some memory leaks problems. Is there a tool or solution to "sandboxe" processes in a fixed amount of memory without using "ulimit" (to generic, I need a per-application memory control)

share|improve this question

2 Answers 2

up vote 2 down vote accepted

'ulimit' is a 'per-application' control… per process in fact. The ulimit shell command is a shell built-in setting the limit for the shell process and its children. Put the 'ulimit' command in the script starting your application and the limit will be set for this application only.

share|improve this answer
As Jacek said, that's what ulimit's for. If a binary application, you could wrap it in a script. –  Warner Mar 3 '10 at 14:06

You could use a process management daemon like monit to monitor the amount of memory in use by your proceses and restart it when it grows over your defined limit.

This does sound drastic, but given your application is known to leak, restarting it regularly based on its usage is just putting off the inevitable, when the process size grows larger than the smaller of, your machines physical memory, or any address space limitations imposed by your operating system.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.