By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,680 Members | 1,486 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,680 IT Pros & Developers. It's quick & easy.

52K exe file and 11MB memory footprint

P: n/a
Hi,

First of all sorry for crossposing this question. I just found out that
this place fits much more than microsoft.public.dotnet.framework

I am playing around a little with C# and the .Net Framework. After
finishing a first application I have a 52K executable. When executing it
I can see that it has a memory usage of allmost 11MB. I guess this is
because of the .Net VM runing. Can I reduce the memory usage somehow?

Thanx in advance,
Chris
Nov 16 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
This was discussed a few days ago...
Keep in mind a lot of that memory is shared between programs running the
CLR.

You should find that minimizing and restoring your app reduces the
footprint. You can do this programmatically with a Win32 API call: Call the
SetProcessWorkingSetSizeEx API function, passing in -1 for the
dwMinimumWorkingSetSize and -1 for the dwMaximumWorkingSetSize parameters.

"Christofer Dutz" <du**@c-ware.de> wrote in message
news:uV*************@tk2msftngp13.phx.gbl...
Hi,

First of all sorry for crossposing this question. I just found out that
this place fits much more than microsoft.public.dotnet.framework

I am playing around a little with C# and the .Net Framework. After
finishing a first application I have a 52K executable. When executing it
I can see that it has a memory usage of allmost 11MB. I guess this is
because of the .Net VM runing. Can I reduce the memory usage somehow?

Thanx in advance,
Chris

Nov 16 '05 #2

P: n/a
Hi Christofer,

I'm not sure exactly why, but running ngen on the executable (compiling it
to native code) seems to cause it to use less memory.

Happy coding!
Morten Wennevik [C# MVP]
Nov 16 '05 #3

P: n/a
Hi,

I believe that the simplest win app use around that amount of memory.,

It's not only because the VM, but it's because the objects that you use, in
the 52K is the code for create for example X numbers of Label objects that
use Y amount of memory.

I don;t think you can reduce the memory usage much more than that.

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Christofer Dutz" <du**@c-ware.de> wrote in message
news:uV*************@tk2msftngp13.phx.gbl...
Hi,

First of all sorry for crossposing this question. I just found out that
this place fits much more than microsoft.public.dotnet.framework

I am playing around a little with C# and the .Net Framework. After
finishing a first application I have a 52K executable. When executing it
I can see that it has a memory usage of allmost 11MB. I guess this is
because of the .Net VM runing. Can I reduce the memory usage somehow?

Thanx in advance,
Chris

Nov 16 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.