4 ms·
It is a tradeoff. With overcommit disabled, the program will fail in a more predictable way. Moreover, if it allocates the memory successfully nothing bad can
by lmilcin 5y ago
It is a tradeoff.
With overcommit disabled, the program will fail in a more predictable way. Moreover, if it allocates the memory successfully nothing bad can happen to it later. So you have the option to allocate the memory right at the startup of your program and be sure it is not going to fail later.
With overcommit enabled you technically have more memory to work with. You could say that if the program has to fail anyway, then it might be better if it fails later at a higher memory usage.