Controlling other process' resources

Started by
2 comments, last by 255 15 years, 4 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.
Advertisement
Bump.
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