VB.net Memory usage 20k app, 15MB memory?

  • Thread starter Thread starter Grant Mills
  • Start date Start date
G

Grant Mills

Is there anyway to reduce the amount of memory a VB.net program allocates?

Just a simple windows form, with one button and a label, and all the button
does is change the
text in the label (it's even hardcoded) and the EXE is using 15000+k of
memory according
to the task manager...


I mean I realize that VB is going to be more bloated than a C++ app. But is
there anyway
to reduce this amount? There should be no reason for it to think it needs to
'hold' 15 megs of memory
for a program that has absolutly no dynamic content.



-Grant
 
Hi Grant,

There where a lot of questions about that, the answer is simple no. Untill
now we did not seen a solution that did make the programs smaller.

Only one solution there has been in this newsgroup to let it look smaller in
the taskmanager.
(The guy who did make it, did know that, however he did it because his
systemadmin did always complain. After that everybody was happy)

Cor
 
Grant,

I wouldn't judge memeory usage of a program by what task manager says.
Memory management in .net is a complex thing and includes lots of
optimizations for performace as well as optimizations for responding to
conditions when system memory may be low. Memory mamagement is also carried
out by the OS.

Try the following to prove this:

1) Run your program
2) Note it's memeory usage in the task manager
3) Minimize your form to the taskbar
4) Note the memory usage now

Unless you're doing a lot of COM interop or have a problem with major memory
leaks (where the usage keeps going up until your system becoms unstable), I
wouldn't worry about it.

HTH,

Trev.
 
* "Grant Mills said:
Is there anyway to reduce the amount of memory a VB.net program allocates?

Yes, by removing parts of it or optimizing the code.
Just a simple windows form, with one button and a label, and all the button
does is change the
text in the label (it's even hardcoded) and the EXE is using 15000+k of
memory according
to the task manager...

That's nothing to worry about. The CLR must be loaded and this will
need some memory.
 
Hi Herfried,
I went to your homepage at mvps.org/dotnet but its in a language that I dont
understand (is it german?), is there any english version of it?
 
* "Abubakar said:
I went to your homepage at mvps.org/dotnet but its in a language that I dont
understand (is it german?), is there any english version of it?

I feel sorry, but the pages are currently only available in German.
You can use Google's language tools to translate the text to English.
 
Back
Top