| > The world is not Linux. Sure, but if linux has this issue, then C++ programs on linux will also have this issue, and the language can't solve that. That's all my point was. > or to change the signature of all memory-allocation function to return Result. When custom allocators part 2 happens, you can. I've already argued the "real exceptions" part above. > Rust is supposed to be a general-purpose systems programming language, not a Linux programming language. Windows does not overcommit. A correctly configured Linux system does not overcommit. Lost of embedded systems don't (and can't) overcommit. Are you saying all of these people should avoid Rust's standard library? No. My point was simply that no language has a complete solution to this problem. Most people don't need to worry about OOM; abort-on-OOM is the expected behavior. For the people who do, there is a mechanism to handle it, as explained above. I can't help it if you have an idealogical issue with that mechanism. But ultimately, it works and can be used. |
I am endlessly frustrated by poorly designed audio software that aborts without saving if an OOM occurs. At the very least, a process should have the oppprtunity to save its state to disk, or ideally continue operating at a reduced capacity (e.g. a video codec might use fewer reference frames) after freeing some resources.