Home
Certification Preparation
LPI, Red Hat & Linux Foundation
Linux Program Dies with Message "Out of Memory"
darkerosxx
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.
Find more posts tagged with
Comments
darkerosxx
I had previously thought cgroups was not the way to do this, but it is... /thread
lsud00d
Thanks 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
wolfinsheepsclothing
Cool link. Thanks!
Quick Links
All Categories
Recent Posts
Activity
Unanswered
Groups
Best Of