> So what your'e saying, is that my application reserves to itself more
> memory
> than it currently requires, but might use in the future - which brings me
> to
> my original question: is there a way to minimize the amount of reserved
> memory of my application?
The default segment sizes for the GC heap are set to 16 MB for the
workstation GC and 64 MB for the server version GC. The GC starts with two
segments one for the normal heap and one for the large object heap.
What you can do is reserve smaller segments (min. 4MB per segment) by
creating you own CLR hosting process using the framework v2.0 unmanaged
hosting API's (search the MSDN docs. for details) , but this makes little
sense as reserved memory does not take up RAM space, and as soon as the
framework starts to create objects , the reserved space will be comitted and
will grow beyond what was reserved and new segments will be created.
Note that even so, you will never be able to run a minimal .NET program into
something that takes less than ~6MB (the working set). What exactly are you
trying to achieve?
Willy.
Amir Shitrit - 29 Sep 2005 22:05 GMT
My team leader asked me to find a way to minimize our app memory consumption.
He claims to use some method to compact the the app's memory consumption,
and wan't to find a way to avoid it by minimizing the initial memory
consumtion.
Does it make any sence?
> > So what your'e saying, is that my application reserves to itself more
> > memory
[quoted text clipped - 17 lines]
>
> Willy.