Quantcast
Channel: Jobs
Viewing all articles
Browse latest Browse all 18427

Memory problem? [solved]

$
0
0
Hi guys I hope someone can help me with the following issue. I created a project with Qt creator which builds perfectly but after launching the program unexpectely quits with a segmentation fault. I guess this is a problem related with memory. I use very large array of maps in the following variable:     map <char,int> conserved1_f[50000];     map <char,int> notConserved1_f[50000];     map <char,int> conserved2_f[50000];     map <char,int> notConserved2_f[50000];     map <string,int> codons;     map <string,int> conservedCodons1[50000][18];     map <string,int> notConservedCodons1[50000][18];     map <string,int> conservedCodons2[50000][18];     map <string,int> notConservedCodons2[50000][18]; If I try to reduce the dimensions of those arrays I get the program regularly launched and perfectly working. It is quite strange since the program worked smoothly before implementing the GUI in Qt. Do you have any idea on what could be the problem? If it is a memory problem I could use the “new” statement. I did this before for very large arrays. The first variable could be declared like: map<char,int> *conservedFavorite = new map<char,int>[5000000]; How can I do the same for the bidimensional arrays? Thanks guys for your help!

Viewing all articles
Browse latest Browse all 18427

Trending Articles