|
|
Subscribe / Log in / New account

Out-of-memory victim selection with BPF

Out-of-memory victim selection with BPF

Posted Aug 17, 2023 19:47 UTC (Thu) by gfernandes (subscriber, #119910)
In reply to: Out-of-memory victim selection with BPF by mpr22
Parent article: Out-of-memory victim selection with BPF

The kernel may not know about malloc - but that does not invalidate the point that malloc is the (correct? certainly is for Java VMs) place to make this decision and penalise the memory hog (or rogue), as opposed to an innocent bystander...


to post comments

Out-of-memory victim selection with BPF

Posted Aug 20, 2023 17:57 UTC (Sun) by jmspeex (subscriber, #51639) [Link]

The this is that the program calling malloc() may very well be the innocent bystander here. You can have the memory hog allocating tons of memory, and then an innocent process tries to allocate a few bytes and trigger an OOM event. The whole point of the OOM killer is to avoid that innocent process getting killed while leaving the memory hog running. Also, as others have pointed out, it's not just malloc() that allocates memory. Growing the stack means memory gets allocated without the process even making a system call.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds