3 ms·
But at least the program wouldn't simply crash. The way you'd implement this is that you'd have a maximum heap, just like now, but if the maximum heap simply is
by saurik 15y ago
But at least the program wouldn't simply crash. The way you'd implement this is that you'd have a maximum heap, just like now, but if the maximum heap simply is not enough (you ran out of memory, you tried to GC, the GC didn't work and you are about to throw OutOfMemoryError) you simply increase the size of the heap by 10% rather than crashing the program.