Click here to Skip to main content
15,910,981 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: tormented by _CrtIsValidHeapPointer (t=day7) Pin
jhwurmbach23-Aug-07 21:56
jhwurmbach23-Aug-07 21:56 
GeneralRe: tormented by _CrtIsValidHeapPointer (t=day7) Pin
devvvy23-Aug-07 22:00
devvvy23-Aug-07 22:00 
GeneralRe: tormented by _CrtIsValidHeapPointer (t=day7) Pin
toxcct23-Aug-07 22:13
toxcct23-Aug-07 22:13 
Generalbecause this is stripped down test app with nothing more than init Pin
devvvy23-Aug-07 22:17
devvvy23-Aug-07 22:17 
GeneralRe: because this is stripped down test app with nothing more than init Pin
jhwurmbach23-Aug-07 23:52
jhwurmbach23-Aug-07 23:52 
AnswerRe: tormented by _CrtIsValidHeapPointer (t=day7) Pin
James R. Twine24-Aug-07 3:59
James R. Twine24-Aug-07 3:59 
GeneralRe: tormented by _CrtIsValidHeapPointer (t=day7) Pin
devvvy24-Aug-07 4:45
devvvy24-Aug-07 4:45 
AnswerRe: tormented by _CrtIsValidHeapPointer (t=day7) Pin
cmk24-Aug-07 10:00
cmk24-Aug-07 10:00 
The most common cause is spelled out in the link you provided:

"The local heap refers to the heap created and managed by a particular instance of the C run-time library. If a dynamic-link library (DLL) contains a static link to the run-time library, it has its own instance of the run-time heap, and therefore its own heap, independent of the application's local heap."

malloc, free, new, delete are applied to the CRT heap of the module (exe, dll) the call resides in.

If all the modules of an app are dynamically linked to the CRT then they all share one set of CRT state (heap, FILE list, ...). Any module that was statically linked to the CRT will have it's own copy of CRT state that it modifies.

...cmk

Save the whales - collect the whole set

GeneralRe: tormented by _CrtIsValidHeapPointer (t=day7) Pin
devvvy29-Aug-07 2:53
devvvy29-Aug-07 2:53 
Questionmultiple document-view architecture Pin
Taruni23-Aug-07 19:59
Taruni23-Aug-07 19:59 
AnswerRe: multiple document-view architecture Pin
jhwurmbach23-Aug-07 21:57
jhwurmbach23-Aug-07 21:57 
AnswerRe: multiple document-view architecture Pin
Iain Clarke, Warrior Programmer23-Aug-07 22:00
Iain Clarke, Warrior Programmer23-Aug-07 22:00 
GeneralRe: multiple document-view architecture Pin
jhwurmbach23-Aug-07 23:55
jhwurmbach23-Aug-07 23:55 
GeneralRe: multiple document-view architecture Pin
jhwurmbach24-Aug-07 0:37
jhwurmbach24-Aug-07 0:37 
General[Message Deleted] Pin
devvvy24-Aug-07 0:47
devvvy24-Aug-07 0:47 
GeneralRe: multiple document-view architecture Pin
jhwurmbach24-Aug-07 0:52
jhwurmbach24-Aug-07 0:52 
GeneralRe: multiple document-view architecture Pin
David Crow24-Aug-07 6:03
David Crow24-Aug-07 6:03 
AnswerRe: multiple document-view architecture Pin
devvvy23-Aug-07 22:50
devvvy23-Aug-07 22:50 
GeneralRe: multiple document-view architecture Pin
Jim Crafton24-Aug-07 7:19
Jim Crafton24-Aug-07 7:19 
Questionstatic variable Pin
George_George23-Aug-07 19:22
George_George23-Aug-07 19:22 
AnswerRe: static variable Pin
User 58385223-Aug-07 19:27
User 58385223-Aug-07 19:27 
GeneralRe: static variable Pin
George_George23-Aug-07 19:35
George_George23-Aug-07 19:35 
GeneralRe: static variable Pin
User 58385223-Aug-07 19:42
User 58385223-Aug-07 19:42 
GeneralRe: static variable Pin
George_George23-Aug-07 20:01
George_George23-Aug-07 20:01 
GeneralRe: static variable Pin
ThatsAlok23-Aug-07 20:04
ThatsAlok23-Aug-07 20:04 

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.