Out of Memory Exception in C++
-
Hi Everyone, I have a application which needs to read a file of size 113MB and stores each row data into a class object which is in turn stored in a std::map. Running it in 32-bit 4 GB RAM , the "Out of Memory" error triggered. After a observation , I felt that the RAM is not sufficient, so now I tried it in 64-bit 8GB RAM system but still the same exception is thrown. Can anyone help me in finding what exactly might be problem and how it can be overcome? Thanks in Advance!!
-
Hi Everyone, I have a application which needs to read a file of size 113MB and stores each row data into a class object which is in turn stored in a std::map. Running it in 32-bit 4 GB RAM , the "Out of Memory" error triggered. After a observation , I felt that the RAM is not sufficient, so now I tried it in 64-bit 8GB RAM system but still the same exception is thrown. Can anyone help me in finding what exactly might be problem and how it can be overcome? Thanks in Advance!!
You should have posted this at C / C++ / MFC Discussion Boards[^] because it is C++ related. What is the size of your
CMyClassObject
and how many items will be stored in the map? I guess that the size of your object is quite large resulting in the out of memory error. You might repost in the C++ forum and edit the post I'm replying to by adding a note that it has been reposted in the C++ forum. When reposting please add the above information (number of items and object size).