I did some thinking about this. Currently vim tries to gracefully handle memory allocation refusals, but I don't think we should do anything beyond using `x{malloc,strdup}` functions that exit the program when allocation fails.

Before exiting we could do some cleanup such a flushing swaps to disk or have a static buffer to use as 'emergency memory' for `sprintf` etc, as long as the program exits when memory allocation fails since it greatly simplifies the code.