Tbh I’ve found that whenever I’ve hit MAX RAM, failed allocations are not the biggest problem you should be focusing at that time.
Sure, it would be nice to get an error, but usually the biggest threat to your system as a whole is the unapologetic OOM Killer