|
-
May 29th, 2009, 03:14 AM
#16
Re: Am I crazy? Is there a bug in a so simple code?
Don't trust Task Manager!
Have a look at How Big Is My Program? essay.
Victor Nijegorodov
-
May 29th, 2009, 03:39 AM
#17
Re: Am I crazy? Is there a bug in a so simple code?
I am aware of the fact, that the TaskManager is not showing used memory but used address space. I am just worried about the fact, that the address space is growing bigger and bigger even if there should be enough free space to address in it.
-
May 30th, 2009, 04:50 AM
#18
Re: Am I crazy? Is there a bug in a so simple code?
I'm using Process Explorer to check detailed information on running programs, memory leaks, handle leaks. It can be downloaded from https://technet.microsoft.com/en-us/.../bb896653.aspx. Its far way better than using task manager for the same purpose.
-
June 1st, 2009, 03:55 AM
#19
Re: Am I crazy? Is there a bug in a so simple code?
Yes the Process Explorer is quite handy. Thanks for the link.
But still it doesn't change the fact that the working set/private bytes are increasing constantly ~4KB/second and continues over 6 hours without any sign of change.
-
June 10th, 2009, 12:28 AM
#20
Re: Am I crazy? Is there a bug in a so simple code?
I made some more testing. The program will ultimately run out of memory and CreateDialog fails (of course).
Can anybody explain that to me? The only thing that would come into my mind would be a leak or memory fragmentation. I don't see a possible leak (except it is in the WinAPI itself) but the constant memory growth does not look like fragmentation.
Are there any other things I am not aware of that could produce such a result?
-
June 10th, 2009, 04:31 AM
#21
Re: Am I crazy? Is there a bug in a so simple code?
It is hard to say something about the reason of your problem without seeing your code. Could you post a small project reproducing such a behaviour?
Victor Nijegorodov
-
June 10th, 2009, 07:13 PM
#22
Re: Am I crazy? Is there a bug in a so simple code?
I believe it is essentially the same as the original poster.
Code:
while (true)
{
HWND hwnd = CreateDialog(NULL, MAKEINTRESOURCE(IDD_ABOUTBOX), NULL, DefWindowProc);
::DestroyWindow(hwnd);
}
or
Code:
while (true)
{
CDialog dlg;
dlg.Create(IDD_ABOUTBOX);
dlg.Destroy();
}
and other variations, like with a CAboutDlg dialog created by the app wizzard.
They all produce the same result.
First I thought WM_NCDESTROY is not called and the dialog will not be destroyed properly, but that is not the case.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|