Question in .Net memory management.

H

Hadi

Hello,

My application is now currently sitting at 100Mb, at least that is how the
Windows Task Manager reported. I am in the process of reducing the RAM
requirement. I downloaded anumber of .Net memory profiler but I am surprised
that according to those profiler the HEAP is only 1.3-1.5Mb? Where does the
rest of memory come from? This is a mystery to me.

Also, using the .Net Memory Profiler from scitech, it reported that the Heap
is 1.3 Mb .. but curiously there is this tab showing the 'Native Memory'
which is a lot closer to what the Windows Task Manager reported. Here is the
breakdown of the 'Native Memory' tab:

Total: 88Mb (107Mb with profiler data)

- Private 56Mb
+---- Managed heaps 2,7Mb
+---- Code 11Mb
+---- JIT 2Mb
+---- Win32 Heaps 24Mb
+---- Other data 15Mb
- Shared 14Mb
- Potentially shared 17Mb


I don't really understand. Why does .Net requires so much memory? Is all of
this 'overhead'? I must have missed soething huge here. Anyone?

Thanks!

Hadi.
 
W

Willy Denoyette [MVP]

Note that the working set of a managed application is larger than a native
windows application. However, it looks like your application uses a lot of
"unmanaged" memory (Win32 heaps and other data), are you calling into
unmanaged code using PInvoke, COM?
What kind of application is it?

Willy.
 
H

Hadi

It's a windows form application. My application hosted a webbrowser control,
and a host of several third party controls. Do you think this may cause the
problem (the third party controls) ?

How do I find out the usage of the "unmanaged" memory?

Thanks,

Hadi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top