News for hackers. Stuff that matters.
Re:The Linux kernel's inability to gracefully handle low mem... by jimpudar on Tuesday August 06, 2019 @02:45PM (#20628187)
You can use ulimit to set soft and hard limits for all sorts of system resources (including memory) on Linux.
Re:The Linux kernel's inability to gracefully handle low mem... by IcePic on Friday August 09, 2019 @11:34AM (#20655301)
..but if the problem is programs not checking malloc() return codes since it will not return failures, then ulimits will in themselves not help the program. It will help the OS to stay alive which is good, but we still need to deal with the programs who expect to run all the way into a swamp and sink without malloc giving them "bad news".
Re:The Linux kernel's inability to gracefully handle low mem... by azinman2 on Tuesday August 06, 2019 @04:51PM (#20629506)
True — I forgot about this. But can you do that on a process via some config _before_ the process is created?
Re:The Linux kernel's inability to gracefully handle low mem... by jimpudar on Wednesday August 07, 2019 @05:43PM (#20639463)
Yeah, usually you call ulimit before calling the process. The new process inherits the limits. If you want to modify the limits of an _existing_ process, you can use prlimit.