Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to limit the memory used by a process?

Status
Not open for further replies.

hyperbug

Programmer
Aug 10, 2001
25
0
0
ES
I would like to know if there is a way to set a limit for the amount of memory used by a process.
 
Sorry, No way. i.e that is why they say read the box before you buy. If an application states it needs x-number of memory to function then it needs it and you cannot cheat.

for example, JAVA is very much memeory hungry and memory driven. If you try cheat and cut back then it sloowwws down all the work you are performing and your internet connection.

So, outside of increasing SWAP and adding more MEMORY, Sun SOE has a feature called SWAPFS File System.

It has something to do with using Virtual versus Physical Swap/Memory space on a SUN Box
 
You can limit the amount of memory for any process under a given user by using the ulimit command. Putting:

ulimit -v 400

in the (ksh) .profile for example will limit all processes for the user to 400 kbytes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top