Click here to Skip to main content
16,018,529 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: help - mfc, and entering text Pin
valikac12-Sep-03 6:04
valikac12-Sep-03 6:04 
GeneralRe: help - mfc, and entering text like on paint Pin
lxxrya00112-Sep-03 11:13
lxxrya00112-Sep-03 11:13 
Generalproblems with textfile and dialog Pin
coda_x11-Sep-03 23:13
coda_x11-Sep-03 23:13 
GeneralRe: problems with textfile and dialog Pin
David Crow12-Sep-03 2:50
David Crow12-Sep-03 2:50 
GeneralProcess command line Pin
confalonieri11-Sep-03 22:54
confalonieri11-Sep-03 22:54 
GeneralRe: Process command line Pin
valikac12-Sep-03 6:09
valikac12-Sep-03 6:09 
GeneralAnother problem with memory Pin
abhi197111-Sep-03 22:44
abhi197111-Sep-03 22:44 
GeneralRe: Another problem with memory Pin
Mike Dimmick12-Sep-03 2:40
Mike Dimmick12-Sep-03 2:40 
Make sure you're measuring the right thing.

If you're looking in Task Manager, the 'Mem Usage' column is in fact the working set size. The 'working set' is the amount of physical memory currently assigned to your program, and includes any code or data shared with other processes.

When you create a common dialog, Windows has to swap in the code from the common dialogs DLL, comdlg32.dll. Thus your working set increases.

However, Windows will only trim your working set (swap out physical pages) when the working set exceeds a particular size, or when memory demand is high. You might not see the working set decrease again in the lifetime of your process.

If you suspect a leak, monitor the 'VM Size' column in Task Manager. This shows the actual amount of virtual memory which is committed by your process (again including code size, which might be shared). You might still see an increase if the common dialogs DLL - or MFC - perform any one-time allocations for the process - some DLLs do so.

Changes in this column will only catch memory allocated with VirtualAlloc or a growing heap; it won't catch small leaks in your heap (since the VM size of the heap will only change if the heap needs more memory to manage). For that, see the crtdbg.h header file.
GeneralRe: Another problem with memory Pin
David Crow12-Sep-03 2:44
David Crow12-Sep-03 2:44 
GeneralRun a function every 100ms Pin
kurnaziso11-Sep-03 22:41
kurnaziso11-Sep-03 22:41 
GeneralRe: Run a function every 100ms Pin
Dangleberry11-Sep-03 22:58
sussDangleberry11-Sep-03 22:58 
Generalplacement new Pin
Dangleberry11-Sep-03 22:26
sussDangleberry11-Sep-03 22:26 
GeneralRe: placement new Pin
Dangleberry11-Sep-03 23:55
sussDangleberry11-Sep-03 23:55 
GeneralC++ editor Pin
Jerome Conus11-Sep-03 22:06
Jerome Conus11-Sep-03 22:06 
GeneralRe: C++ editor Pin
berndg12-Sep-03 0:19
berndg12-Sep-03 0:19 
GeneralRe: C++ editor Pin
Neville Franks12-Sep-03 0:26
Neville Franks12-Sep-03 0:26 
GeneralRe: C++ editor Pin
typist12-Sep-03 1:22
typist12-Sep-03 1:22 
GeneralRe: C++ editor Pin
Dangleberry12-Sep-03 1:46
sussDangleberry12-Sep-03 1:46 
GeneralPainting problem in CFormView with overlapping ActiveX Pin
sanskypotov11-Sep-03 21:47
sanskypotov11-Sep-03 21:47 
GeneralRead backwarts from file Pin
Eddie70011-Sep-03 20:29
Eddie70011-Sep-03 20:29 
GeneralRe: Read backwarts from file Pin
Neville Franks12-Sep-03 0:32
Neville Franks12-Sep-03 0:32 
GeneralRe: Read backwarts from file Pin
Dangleberry12-Sep-03 1:49
sussDangleberry12-Sep-03 1:49 
GeneralRe: Read backwarts from file Pin
Mike Dimmick12-Sep-03 2:56
Mike Dimmick12-Sep-03 2:56 
GeneralRe: Read backwarts from file Pin
Eddie70015-Sep-03 1:23
Eddie70015-Sep-03 1:23 
GeneralCListCtrl + InsertColumn Pin
KKR11-Sep-03 19:44
KKR11-Sep-03 19:44 

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.