Dominique wrote:
> This fixes yet another crash after out-of-memory error in `expand_shellcmd()` > in vim-8.2.94. > > I think that there are probably many other places where failures to allocate > are not gracefully handled. > I'm not sure whether it's really worth fixing them. They are very > unlikely to happen. > But at least this one is simple to fix. Most places are unlikely to actually run out of memory. But in some places it is important to catch. E.g. when saving for undo or making a complicated change that eats up lots of memory. It is hard to predict where this happens, thus the best will be to fix all we can find. Some engineers are lazy and say "you can't find and fix all, just let it crash". Or, when working on code for the Amiga: "you have a whole Megabyte of memory, you won't ever run out!". On Linux some people say that because of overcommitting it will crash anyway. That of course means you need to disable overcommitting, not stop checking for running out of memory. Overcommitting was made for servers where processes can be restarted without losing data, not for running end-user commands. -- Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us. (Calvin) /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/202001072012.007KC8fa007317%40masaka.moolenaar.net.
