Suppressing SIGBUS signals
Suppressing SIGBUS signals
Posted Jun 26, 2021 2:04 UTC (Sat) by NYKevin (subscriber, #129325)In reply to: Suppressing SIGBUS signals by sbaugh
Parent article: Suppressing SIGBUS signals
Meh, that's a matter of perspective. Crashing is only the default behavior, and they are working to make it easier to avoid crashing on OOM. There is no technical reason* why OOMing needs to crash, in a language with manual memory management. You could instead have fallible allocation and require the application to handle an OOM condition explicitly.
* You cannot control what the OOM killer does (although the sysadmin can, to some extent). But the OOM killer could even kill a completely unrelated process, and is not part of Rust itself, so let's ignore it. Besides, since Rust is a systems language, it can be used to write kernelspace code that is exempt from the OOM killer altogether.