3 ms·
If a memory allocations fails with strict mode then you'll get a null pointer returns and some kind of crash or panic (in code that doesn't handle it properly).
by IshKebab 4mo ago
If a memory allocations fails with strict mode then you'll get a null pointer returns and some kind of crash or panic (in code that doesn't handle it properly).
If it fails with the default mode the whole process will get killed by the OS. Is that really much better?
- man8alexd 4mo agoOOM is better. If a program doesn't handle ENOMEM properly, then its state is unpredictable and can lead to data corruption.
- IshKebab 4mo agoI don't think it's as simple as that. Killing a program can have unintended consequences too, e.g. corrupting files they were in the middle of writing.