Click here to Skip to main content
15,908,674 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Xml in C++ Pin
George L. Jackson26-Apr-07 13:28
George L. Jackson26-Apr-07 13:28 
GeneralRe: Xml in C++ Pin
George L. Jackson26-Apr-07 13:16
George L. Jackson26-Apr-07 13:16 
AnswerRe: Xml in C++ Pin
Paresh Chitte26-Apr-07 18:59
Paresh Chitte26-Apr-07 18:59 
AnswerRe: Xml in C++ Pin
Hamid_RT26-Apr-07 21:47
Hamid_RT26-Apr-07 21:47 
QuestionOver the HEAP: Tracking down a heap error Pin
@largeinsd26-Apr-07 8:14
@largeinsd26-Apr-07 8:14 
AnswerRe: Over the HEAP: Tracking down a heap error Pin
Mark Salsbery26-Apr-07 8:45
Mark Salsbery26-Apr-07 8:45 
QuestionRe: Over the HEAP: Tracking down a heap error Pin
David Crow26-Apr-07 10:00
David Crow26-Apr-07 10:00 
AnswerRe: Over the HEAP: Tracking down a heap error Pin
Stephen Hewitt26-Apr-07 13:49
Stephen Hewitt26-Apr-07 13:49 
Try enabling the page heap[^] for your process. Follow these steps:
1. Download and install WinDBG[^].
2. Select “Start”->“All Programs”->“Debugging Tools for Windows”->“Global Flags”.
3. Select the “Image File” tab.
4. In the “Image: (TAB to refresh)” edit control enter the name of your app then press TAB. Just the name with the extension; not the full path.
5. Tick the following:
- “Enable page heap”
- “Enable heap tail checking”
- “Enable heap free checking”
- “Enable heap parameter checking”
- “Enable heap validation on call”
- “Create user mode stack trace database”
6. Press “Apply”.
7. Debug your application. Any debugger will do but with WinDBG you have access to the stack traces of allocations via the !heap –p –a command, for example. When a heap problem is detected a breakpoint will be generated.
8. When done un-tick all the options you ticked, press “Apply” then dismiss GFlags. This step is important as if it’s skipped all applications named as entered in step 4 will run with the page heap enabled.

Note that when using the page heap your application will run much slower than normal and consume way more memory. It’s good to have a beefy machine to do such tests; and such tests should be ran regularly on all applications you develop as part of regular testing activities. If I find a part of my application that’s too slow with the page heap enabled I optimize the memory allocation in that region.


Steve

QuestionVC++2005: ActiveX event that must be handled... Pin
Joan M26-Apr-07 7:17
professionalJoan M26-Apr-07 7:17 
QuestionEnquiry on playing avi file with MFC application Pin
YUANGE26-Apr-07 7:16
YUANGE26-Apr-07 7:16 
AnswerRe: Enquiry on playing avi file with MFC application Pin
David Crow26-Apr-07 10:01
David Crow26-Apr-07 10:01 
GeneralRe: Enquiry on playing avi file with MFC application Pin
YUANGE27-Apr-07 4:46
YUANGE27-Apr-07 4:46 
GeneralRe: Enquiry on playing avi file with MFC application Pin
David Crow27-Apr-07 4:50
David Crow27-Apr-07 4:50 
GeneralRe: Enquiry on playing avi file with MFC application Pin
YUANGE27-Apr-07 6:56
YUANGE27-Apr-07 6:56 
GeneralRe: Enquiry on playing avi file with MFC application Pin
David Crow27-Apr-07 9:18
David Crow27-Apr-07 9:18 
AnswerRe: Enquiry on playing avi file with MFC application Pin
Mark Salsbery26-Apr-07 10:26
Mark Salsbery26-Apr-07 10:26 
AnswerRe: Enquiry on playing avi file with MFC application Pin
Hamid_RT26-Apr-07 21:43
Hamid_RT26-Apr-07 21:43 
QuestionVC++2005: if an app loses the focus, how can I know? Pin
Joan M26-Apr-07 5:35
professionalJoan M26-Apr-07 5:35 
AnswerRe: VC++2005: if an app loses the focus, how can I know? Pin
Arman S.26-Apr-07 5:47
Arman S.26-Apr-07 5:47 
GeneralRe: VC++2005: if an app loses the focus, how can I know? Pin
Joan M26-Apr-07 5:59
professionalJoan M26-Apr-07 5:59 
QuestionC++ where to First? Pin
z1n26-Apr-07 4:58
z1n26-Apr-07 4:58 
AnswerRe: C++ where to First? Pin
Arman S.26-Apr-07 5:36
Arman S.26-Apr-07 5:36 
AnswerRe: C++ where to First? Pin
toxcct26-Apr-07 7:17
toxcct26-Apr-07 7:17 
AnswerRe: C++ where to First? Pin
Paresh Chitte26-Apr-07 19:16
Paresh Chitte26-Apr-07 19:16 
AnswerRe: C++ where to First? Pin
Hamid_RT26-Apr-07 21:43
Hamid_RT26-Apr-07 21:43 

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.