Check out 'ulimit'. You can set limits on per-user basis. Don't remember the exact name, but there's something like /etc/login.defs that has a lot of 'ulimit' type of stuff defined (very distro-dependant mind you). Like DanielHozac said though, if the app needs it, it will probably die if you don't let it get the memory it needs. 'ulimit' is good for keeping runaway processes from taking down the box though (like when you use PHP and try experimenting with recursive MySQL queries and it goes up in smoke ;-) )
The reason I want to limit the memory use is beacuse I have an application that right away took all 512MB RAM available in a system. Then we upgraded to 1GB of RAM just to find out that the application happily grabbed that too.
Of course I could start all other applications first and then my memory hog, but I would rather restrict it more.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.