473,419 Members | 1,633 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,419 software developers and data experts.

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

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.

--
Scott Emick
Web Programmer
Fox International
Remove the ham from mail address if it's not spam
Nov 23 '05 #1
5 1865
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.

--
<i><b>RageInTheMachine9532</b></i><font size="-2">
"<i>...a pungent, ghastly, stinky piece of cheese!</i>" <b>-- The Roaming
Gnome</b></font>
"Scott Emick" wrote:
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.

--
Scott Emick
Web Programmer
Fox International
Remove the ham from mail address if it's not spam

Nov 23 '05 #2

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]

"Scott Emick" <se****@ham.fox-international.com> schreef in bericht
news:%2***************@TK2MSFTNGP10.phx.gbl...
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.

--
Scott Emick
Web Programmer
Fox International
Remove the ham from mail address if it's not spam

Nov 23 '05 #3

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]

"Scott Emick" <se****@ham.fox-international.com> schreef in bericht
news:%2***************@TK2MSFTNGP10.phx.gbl...
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.

--
Scott Emick
Web Programmer
Fox International
Remove the ham from mail address if it's not spam

Nov 23 '05 #4
"Scott Emick" <se****@ham.fox-international.com> schrieb:
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/UserSamples/Details.aspx?SampleGuid=3254325d-a4aa-4bb3-aa86-c72d5104ec74>

CLR Profiler (v2.0)
<URL:http://www.microsoft.com/downloads/details.aspx?FamilyId=86CE6052-D7F4-4AEB-9B7A-94635BEEBDDA&displaylang=en>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 23 '05 #5
Thanks everyone for all the tips, I will try them out this week.

Scott Emick
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:O9****************@TK2MSFTNGP12.phx.gbl...
"Scott Emick" <se****@ham.fox-international.com> schrieb:
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/UserSamples/Details.aspx?SampleGuid=3254325d-a4aa-4bb3-aa86-c72d5104ec74>

CLR Profiler (v2.0)
<URL:http://www.microsoft.com/downloads/details.aspx?FamilyId=86CE6052-D7F4-4AEB-9B7A-94635BEEBDDA&displaylang=en>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 23 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Aravind | last post by:
Hi, I am trying to create a image object out of a bitmap file like Image img = new Bitmap(@"c-\CurDisplayImage.bmp"); ,I found the memory of the process is increased twice as the bitmap size ,...
7
by: W. Jordan | last post by:
Hello, I am using Response.WriteFile (filename) to write a file that on the server to my web client. I discover that the while a client request a big file, for example, a 14m-bytes one, the...
2
by: saran | last post by:
I am having a problem with MySQL consuming a lot of memory and eventually throwing an Out of Memory error and restarting itself. The symptoms are that swap usage continues to rise until some...
16
by: Michael M. | last post by:
How to find the longst element list of lists? I think, there should be an easier way then this: s1 = s2 = s3 = if len(s1) >= len(s2) and len(s1) >= len(s3): sx1=s1 ## s1 ist längster
7
by: Ravi | last post by:
I created a program just to amuse me. I consumes a lot of memory and never gives it up: #incluse <stdio.h> #include <stdlib.h> int main(void) { void *a; while(1) a = malloc(99999); }
0
by: Venkatesha | last post by:
Hi All, I wrote a sample windows application in C#, which contains a data class which has 2 float values and 3 bool values. public class DataPoints { float xval; float yval; bool typ1;...
0
by: sweavo | last post by:
Hi all, (Python 2.5 under cygwin) I'm reading a bunch of XML files and merging them in memory - each file contains a number of packages which are to be merged: for fname in gInfiles: ...
3
by: Lance Wynn | last post by:
Hello, I am receiving this error when trying to instantiate a webservice component. I have 2 development machines, both are XP sp2 with VS 2008 installed. On one machine, the code works fine. On...
1
lifeisgreat20009
by: lifeisgreat20009 | last post by:
There are around 861 files in the Internet Explorer Folder with the name series as follows reg00002 . . . . . .reg01010
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.