profiler says good, Process Explorer says bad

Use this forum for questions on how to use .NET Memory Profiler and how to analyse memory usage.
Post Reply
splashup
Posts: 3
Joined: Sun Nov 05, 2006 8:47 am

profiler says good, Process Explorer says bad

Post by splashup » Sun Nov 05, 2006 9:01 am

hi,

i am using your nice software (evaluation period) for several days, but i am facing strange problem.

at the beggning i thought that MemProf is little complicated for our Big software. so to understand it i created small application which consumes memory.

the application creates an array at start, and by pressing Add button i add an objec of my own, that have several hudred data rows, to the array.
and then another button to dismiss those new objects (i tried several ways, one of which is to assing the arraylist to null).

the problem is that the MemoProf says that my objects get cleared...but the Process Explorer shows an on-going increase of memory. when i dont click the Add the increase stops...but when i click Clear it just doesnt go down no matter how long i wait. but MemoProf says its clear! :S

any explanation, help?
thanks :)

splashup
Posts: 3
Joined: Sun Nov 05, 2006 8:47 am

one correction

Post by splashup » Sun Nov 05, 2006 9:09 am

memory may go down sometimes, but compared to the memory consumed..it's nothing

Andreas Suurkuusk
Posts: 1029
Joined: Wed Mar 02, 2005 7:53 pm

Post by Andreas Suurkuusk » Mon Nov 06, 2006 7:19 pm

The memory presented by the Task manager (the Mem Usage column under the Process tab) is the amount of physical memory currently in use by the process. This number does not directly correspond the number of live bytes presented by the profiler.

When you stop using an instance in your process, the runtime will be able to garbage collect the instance. After an instance has been garbage collected, its memory will not be presented in a heap snapshot, and there will be free space on the GC heap. This space is normally not released back to the operating system, since it is very likely that your program will perform additional allocations and reuse the memory. However, if your program has free managed memory that has not been reused for a while, then the runtime might decide to release the memory back to the operating system. When this happens, the memory usage presented by the Task manager will probably decrease (if the released memory was mapped to physical memory, i.e. part of the process working set).
Best regards,

Andreas Suurkuusk
SciTech Software AB

splashup
Posts: 3
Joined: Sun Nov 05, 2006 8:47 am

thanks

Post by splashup » Tue Nov 07, 2006 3:40 pm

thank you very much for your illustrative answer.

and good job for the nice software :)

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 18 guests