Controlling other process' resources
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.
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().
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
Popular Topics
Advertisement