Advertisement

Controlling other process' resources

Started by December 08, 2008 05:18 AM
2 comments, last by 255 15 years, 11 months ago
Hi there. I'm spawning a child process (under Linux) and I'd like to restrict it to X meg of RAM and Y% of CPU. Is this possible? Thanks.
Bump.
Advertisement
Moving to the Unix forum...
For limiting RAM, see setrlimit().
I don't know if it's possible to set a CPU limit as a percentage, but you can set a process priority using nice() or setpriority().

This topic is closed to new replies.

Advertisement