End Google Ads 201810 - BS.net 01 --> Creating a dynamic 2-dimensional array (matrix) using a pointer-to-pointer works for small matrices. If I try to allocate huge matrices (with new), not necessarily larger than the available memory, no bad_alloc exception is thrown and linux becomes very slow!
With one dimensional array (vector) it works perfectly: as soon as you exceed ram+swap a bad_alloc exception is thrown.
Can anybody confirm?
Is this due to the fact that if the matrix is huge each element of the array of pointers has to point to numerous elements and it is not guaranteed that consecutive memory is available??