This forum has been archived. All content is frozen. Please use KDE Discuss instead.

std::bad_alloc

Tags: None
(comma "," separated)
steltsop
Registered Member
Posts
10
Karma
0

std::bad_alloc

Mon Feb 17, 2014 10:52 am
Hello, I m using the ComplexEigenSolver for computing the eigenvalues and eigenvectors of a non-symmetrical matrix.My code also contains a lot of matrix multiplcations and some matrix inversions.I m using dynamic memory for storing the matrices (using MatrxXcd) and I m working with a laptop that has 8GB of RAM.
When I increase the size of the matrices to 2000*2000=4000000 elements I get a std::bad_alloc exception.
Is there any way to deal with that ?
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: std::bad_alloc

Mon Feb 17, 2014 1:11 pm
That means you're running out of memory. try to limit the number of matrices that have to be allocated at the same time or track possible memory leaks in your application.


Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Google [Bot], Yahoo [Bot]