how can I find what is consuming memory in my vb .net exe?

S

Scott Emick

I have rather small project that is a store/dealer locator but it is
consuming about 143 MB in terms of the virtual memory I believe. Working
set is 46 MB and Private Bytes 32 MB.

The project is a form and a module. The form has a datagrid, textbox, and
command button on it.
I am loading about 146 locations into a datatable/dataset to search through
and using trig functions to calulate distance from ZIP(long/lat ) for each
location and then putting that distance into a column in the datatable which
is bound to the datagrid via a dataview. (so I can sort).

I can't figure out what is consuming all this memory. The dataset I saved
to XML and it is only like 73K. I don't know where else to look, I've look
in Sysinternals Process Explorer, but I really can't find any way to break
up the memory.
 
G

Guest

Well, part of the problem is that you're looking in the wrong place to see
how much memory your app is actually using. TaskManager is probably the
worst tool to use. You could use either Performance Monitor and the .NET CLR
counters to get a better overall picture of memory or you could use the CLR
Profiler (Microsoft Downloads) for a picture of your memory allocation at any
point in time.
 
M

m.posseth

some tips to reduce memory consumption of your program

1. do not use public variabels
2. do not use modules
3. use only the import statements , and references that you really need
4 . write you proggy in a true OOP way however keep in mind that OOP saves
memory but costs more processing power

regards

Michel Posseth [MCP]
 
M

m.posseth

some tips to reduce memory consumption of your program

1. do not use public variabels
2. do not use modules
3. use only the import statements , and references that you really need
4 . write you proggy in a true OOP way however keep in mind that OOP saves
memory but costs more processing power

regards

Michel Posseth [MCP]
 
H

Herfried K. Wagner [MVP]

Scott Emick said:
I can't figure out what is consuming all this memory. The dataset I saved
to XML and it is only like 73K. I don't know where else to look, I've
look in Sysinternals Process Explorer, but I really can't find any way to
break up the memory.

Allocation Profiler src
<URL:http://www.gotdotnet.com/Community/...mpleGuid=3254325d-a4aa-4bb3-aa86-c72d5104ec74>

CLR Profiler (v2.0)
<URL:http://www.microsoft.com/downloads/...52-D7F4-4AEB-9B7A-94635BEEBDDA&displaylang=en>
 
S

Scott Emick

Thanks everyone for all the tips, I will try them out this week.

Scott Emick
 

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