Click here to Skip to main content
15,893,161 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: C function call question. Pin
Chris Losinger11-Aug-17 3:36
professionalChris Losinger11-Aug-17 3:36 
GeneralRe: C function call question. Pin
samzcs11-Aug-17 3:50
samzcs11-Aug-17 3:50 
GeneralRe: C function call question. Pin
Chris Losinger11-Aug-17 3:52
professionalChris Losinger11-Aug-17 3:52 
GeneralRe: C function call question. Pin
samzcs11-Aug-17 4:22
samzcs11-Aug-17 4:22 
GeneralRe: C function call question. Pin
«_Superman_»14-Aug-17 15:50
professional«_Superman_»14-Aug-17 15:50 
GeneralRe: C function call question. Pin
Richard MacCutchan11-Aug-17 3:59
mveRichard MacCutchan11-Aug-17 3:59 
GeneralRe: C function call question. Pin
k505411-Aug-17 5:13
mvek505411-Aug-17 5:13 
GeneralRe: C function call question. Pin
k505411-Aug-17 10:35
mvek505411-Aug-17 10:35 
AnswerRe: C function call question. Pin
Kornfeld Eliyahu Peter12-Aug-17 23:47
professionalKornfeld Eliyahu Peter12-Aug-17 23:47 
QuestionRe: C function call question. Pin
David Crow14-Aug-17 2:16
David Crow14-Aug-17 2:16 
AnswerRe: C function call question. Pin
Kornfeld Eliyahu Peter14-Aug-17 2:54
professionalKornfeld Eliyahu Peter14-Aug-17 2:54 
QuestionRe: C function call question. Pin
David Crow14-Aug-17 2:57
David Crow14-Aug-17 2:57 
AnswerRe: C function call question. Pin
Kornfeld Eliyahu Peter14-Aug-17 4:02
professionalKornfeld Eliyahu Peter14-Aug-17 4:02 
QuestionOut of Memory Exception in C++ Pin
divya0310-Aug-17 2:16
divya0310-Aug-17 2:16 
QuestionRe: Out of Memory Exception in C++ Pin
David Crow10-Aug-17 3:19
David Crow10-Aug-17 3:19 
AnswerRe: Out of Memory Exception in C++ Pin
divya0310-Aug-17 3:26
divya0310-Aug-17 3:26 
QuestionRe: Out of Memory Exception in C++ Pin
David Crow10-Aug-17 3:32
David Crow10-Aug-17 3:32 
AnswerRe: Out of Memory Exception in C++ Pin
divya0310-Aug-17 17:24
divya0310-Aug-17 17:24 
AnswerRe: Out of Memory Exception in C++ Pin
jeron110-Aug-17 3:54
jeron110-Aug-17 3:54 
GeneralRe: Out of Memory Exception in C++ Pin
divya0310-Aug-17 17:20
divya0310-Aug-17 17:20 
GeneralRe: Out of Memory Exception in C++ Pin
jeron111-Aug-17 4:21
jeron111-Aug-17 4:21 
AnswerRe: Out of Memory Exception in C++ Pin
SeattleC++11-Aug-17 10:31
SeattleC++11-Aug-17 10:31 
118Mb isn't all that big. You could easily hold it in memory. The map is costing you the size of the class plus about four pointers worth of storage for each entry. Perhaps your class stores the data very inefficiently. Perhaps you have a bug on reading in the data, like not recognizing end of file and adding endless entries until you run out of memory. Perhaps you have a memory leak.
  • How many rows are in the file? You can easily build a function to count rows using the current function that inputs data, but without saving the data.
  • How many rows are read in at the time the out-of-memory exception occurs? This and the last question might tell you if you had a bug inputting the data.
  • Are you using std::string to hold any of the row data, because memory costs can really add up when using std::string.
Maybe your representation is too expensive for the memory you have. You could approach this problem by reading in the file as a block, and building a data structure that puts pointers into the file block for each line, and then parse out a single line when you need one.
GeneralRe: Out of Memory Exception in C++ Pin
divya0313-Aug-17 19:03
divya0313-Aug-17 19:03 
GeneralRe: Out of Memory Exception in C++ Pin
SeattleC++14-Aug-17 5:03
SeattleC++14-Aug-17 5:03 
AnswerRe: Out of Memory Exception in C++ Pin
leon de boer12-Aug-17 19:00
leon de boer12-Aug-17 19:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.