In my case (64bit ubuntu with 16GB memory, using Eigen3), I write MatrixXd m(M,M); where M = 100,000, while running, the program crashed, and reported:
what(): std::bad_alloc
Aborted (core dumped)
Using a dynamic 2 dim array, the program works fine. Is there a hard limit on the size of (dense) matrix in Eigen?