Large exe file

G

Guest

Hi,

I've written a somewhat large program over the years (70.000 lines of code).
When compiling the program I get a 2MB exe file. When running this program I
get an corresponding image in the task manager showing a 40 MB memory
allocation . Yes, the program allocates memory dynamicaly, but no where near
this amout of memory. Of cause I expect some .net stuff is probably also
contained in this allocation. However, if reinstantiating the program several
times, every instance (shown in the task manager) is showing a memory usage
of around 40-50 MB. I thought that code was shared in such scenarios in order
to save memory space.

Q: What si happening in .net?

Q: Is there any flag/compiler option that I can check/uncheck to a smaller
memory allocation.

Best regards
Jesper, Denmark

NB. U.S.A, Congratulation with the election result!!!.
 
M

Michael Nemtsev

Hello Denmark,

..NET uses virtual memmory and allocation performs in blocks which size is
32/64mb.
I see no reason to change working set for app and allow framework to manage
memmory by default settings.

DJ> Hi,
DJ>
DJ> I've written a somewhat large program over the years (70.000 lines
DJ> of code). When compiling the program I get a 2MB exe file. When
DJ> running this program I get an corresponding image in the task
DJ> manager showing a 40 MB memory allocation . Yes, the program
DJ> allocates memory dynamicaly, but no where near this amout of memory.
DJ> Of cause I expect some .net stuff is probably also contained in this
DJ> allocation. However, if reinstantiating the program several times,
DJ> every instance (shown in the task manager) is showing a memory usage
DJ> of around 40-50 MB. I thought that code was shared in such scenarios
DJ> in order to save memory space.
DJ>
DJ> Q: What si happening in .net?
DJ>
DJ> Q: Is there any flag/compiler option that I can check/uncheck to a
DJ> smaller memory allocation.
DJ>
DJ> Best regards
DJ> Jesper, Denmark
DJ> NB. U.S.A, Congratulation with the election result!!!.
DJ>
---
WBR,
Michael Nemtsev :: blog: http://spaces.live.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsch
 

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