In a number of scenarios, we allocate fairly large arrays, i.e. a 4 million by 800 matrix of double precision numbers, which we fill column by column during an iterative process.
On several occasions we have noted that the memory used as reported by the operating system does not correspond to what we would expect by simple counting (4 million * 800 * 8 bytes), but is much lower and is then slowly increased as the iterations continue. This suggests that the compiler keeps an eye on how much memory is actually used - a very cool feature, since our iterations often stop before we reach the last column.
However, it would be nice to have a compiler option, where one could for debugging purposes force the compiler to immediately allocate the entire array. A search in the man page did not bring up anything, so therefore I am asking you guys/girls if you know of such an option?