Linux Program Dies with Message "Out of Memory"
darkerosxx
Banned Posts: 1,343
Anybody know how to make a program that uses X amount of memory die with a message saying "out of memory"? Permanently? The only way I know of is with OOM Killer and even then you have to adjust in the /proc/$pid directory, which means it's not permanent and won't last after a reboot.
Comments
-
darkerosxx Banned Posts: 1,343I had previously thought cgroups was not the way to do this, but it is... /thread
-
lsud00d Member Posts: 1,571Thanks for the update! I hadn't heard of cgroups but found this great explanation:
https://sysadmincasts.com/episodes/14-introduction-to-linux-control-groups-cgroups