Click here to Skip to main content
15,900,906 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: crash in memory heap allocation - windows 7 - Unicode project Pin
Richard MacCutchan21-Dec-11 22:05
mveRichard MacCutchan21-Dec-11 22:05 
GeneralRe: crash in memory heap allocation - windows 7 - Unicode project Pin
zon_cpp21-Dec-11 22:08
zon_cpp21-Dec-11 22:08 
GeneralRe: crash in memory heap allocation - windows 7 - Unicode project Pin
Mohibur Rashid21-Dec-11 22:31
professionalMohibur Rashid21-Dec-11 22:31 
GeneralRe: crash in memory heap allocation - windows 7 - Unicode project Pin
zon_cpp21-Dec-11 22:50
zon_cpp21-Dec-11 22:50 
GeneralRe: crash in memory heap allocation - windows 7 - Unicode project Pin
Richard MacCutchan22-Dec-11 1:00
mveRichard MacCutchan22-Dec-11 1:00 
GeneralRe: crash in memory heap allocation - windows 7 - Unicode project Pin
Richard MacCutchan21-Dec-11 22:51
mveRichard MacCutchan21-Dec-11 22:51 
AnswerRe: crash in memory heap allocation - windows 7 - Unicode project Pin
Erudite_Eric22-Dec-11 0:14
Erudite_Eric22-Dec-11 0:14 
AnswerRe: crash in memory heap allocation - windows 7 - Unicode project Pin
Chuck O'Toole22-Dec-11 4:26
Chuck O'Toole22-Dec-11 4:26 
In case it's not been clear in the other messages:

A heap corruption message, and specifically that message, is telling you that somewhere, somewhen, the internal stuctures of the heap's memory management have been overwritten (corrupted). Because it did not or could not detect it at the moment it happened, heap corruptions are reported when you do something that requires the heap and that's when the run time library runs a "heap consistency check" and throws the error message.

So, it's not telling you that the particular call you did was wrong, it's just that the call was the first place it detected a previous corruption. So it's important to not focus on that particular call as the source of the problem. However, that call does give you a point in time when the corruption occurred. If you have other allocation / deallocation calls in your code, you know that the corruption occurred sometime between the last heap call and this one. That gives you a chance to narrow down the section of code to look at.

Lastly, heap corruption detection only happens in debug mode code / libraries as it is a performance hog. So, you can have had this bug for a long time and never notice it in production mode code.
AnswerRe: crash in memory heap allocation - windows 7 - Unicode project Pin
Albert Holguin22-Dec-11 5:21
professionalAlbert Holguin22-Dec-11 5:21 
Questionabout DLL dependencies Pin
ryan218921-Dec-11 5:37
ryan218921-Dec-11 5:37 
AnswerRe: about DLL dependencies Pin
Richard Andrew x6422-Dec-11 10:10
professionalRichard Andrew x6422-Dec-11 10:10 
AnswerRe: about DLL dependencies Pin
Lactoferrin22-Dec-11 21:14
Lactoferrin22-Dec-11 21:14 
Questioncalling a function multple times, clears previous values Pin
jkirkerx20-Dec-11 17:14
professionaljkirkerx20-Dec-11 17:14 
AnswerRe: calling a function multple times, clears previous values Pin
Richard MacCutchan20-Dec-11 21:46
mveRichard MacCutchan20-Dec-11 21:46 
GeneralRe: calling a function multple times, clears previous values Pin
jkirkerx21-Dec-11 6:16
professionaljkirkerx21-Dec-11 6:16 
QuestionRe: calling a function multple times, clears previous values Pin
David Crow21-Dec-11 2:38
David Crow21-Dec-11 2:38 
AnswerRe: calling a function multple times, clears previous values Pin
jkirkerx21-Dec-11 6:23
professionaljkirkerx21-Dec-11 6:23 
AnswerRe: calling a function multple times, clears previous values Pin
David Crow21-Dec-11 7:54
David Crow21-Dec-11 7:54 
GeneralRe: calling a function multple times, clears previous values Pin
jkirkerx21-Dec-11 8:15
professionaljkirkerx21-Dec-11 8:15 
GeneralMuch better now Pin
jkirkerx23-Dec-11 12:48
professionaljkirkerx23-Dec-11 12:48 
Question16 bit C Compiler Pin
softwaremonkey19-Dec-11 23:40
softwaremonkey19-Dec-11 23:40 
AnswerRe: 16 bit C Compiler Pin
CPallini19-Dec-11 23:55
mveCPallini19-Dec-11 23:55 
AnswerRe: 16 bit C Compiler Pin
User 742933820-Dec-11 8:12
professionalUser 742933820-Dec-11 8:12 
GeneralRe: 16 bit C Compiler Pin
softwaremonkey20-Dec-11 8:23
softwaremonkey20-Dec-11 8:23 
GeneralRe: 16 bit C Compiler Pin
Richard MacCutchan20-Dec-11 21:40
mveRichard MacCutchan20-Dec-11 21:40 

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.