18.05.2012, 21:52
Quote:
No, memory is not limitless, but we're not talking about ALL memory, we're only talking about stack and heap memory. This is allocated when a function begins and destroyed when a function ends, as long as you know what functions are called and what variables are in functions, you should never run out of memory because it is constantly being freed and there is a static upper bound. The issue here is that the upper bound is higher than the default, but can be very easilly reduced by, as I say, using smaller arrays and fixing recursion (which is not an issue here).
|