Better out of memory handling

I think there should be better out-of-memory handling.

I’m using HAOS on a Rpi4 with 2GB RAM and when I’m running a bunch of memory-intensive add-ons, when the system runs out of RAM, it either just kills Python3 and restarts HA or, worse, it just dies and has to be manually rebooted.

I’m fully aware that this is mainly caused by me using addons from 3rd-party repos (such as Sonarr from alexbelgium’s repo) so I’m not blaming anyone but myself but I still think there should be a priority system that keeps the very core (python3) alive at all times as HA can run on devices that are much more memory-strapped than the Pi (such as low-end NASes).

In my case, the main culprit is running the 64bit variant of HAOS as it uses roughly 25% more RAM to run the same setup as the 32bit variant. I’ll just switch back to 32bit for the time being.