High memory usage

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Philip Carnstam

    High memory usage

    How come .Net applications use so much memory? Every application I compile
    uses at least 10 MB of memory, even the ones consisting of only a form and
    nothing else. If I minimize them though the memory usage drops to a couple
    hundred KB. Why?

    Is there anything I should to to prevent this? I have compiled in release
    and deactivated all forms of debugging, I think!

    Thanks,
    Philip


  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: High memory usage

    Philip,

    You could reduce the working set down to zero using API calls, but it
    will just creep back up. The reason why the memory is consumed is because
    the runtime is using the memory for garbage collection.

    Hope this helps.


    --
    - Nicholas Paldino [.NET/C# MVP]
    - nicholas.paldin o@exisconsultin g.com

    "Philip Carnstam" <philip.carnsta m@carnstam.net> wrote in message
    news:%23Syq3q9c DHA.652@tk2msft ngp13.phx.gbl.. .[color=blue]
    > How come .Net applications use so much memory? Every application I compile
    > uses at least 10 MB of memory, even the ones consisting of only a form and
    > nothing else. If I minimize them though the memory usage drops to a couple
    > hundred KB. Why?
    >
    > Is there anything I should to to prevent this? I have compiled in release
    > and deactivated all forms of debugging, I think!
    >
    > Thanks,
    > Philip
    >
    >[/color]


    Comment

    • Pete

      #3
      Re: High memory usage

      Hi,

      Nicholas Paldino [.NET/C# MVP] wrote:[color=blue]
      > You could reduce the working set down to zero using API calls,
      > but it will just creep back up. The reason why the memory is
      > consumed is because the runtime is using the memory for garbage
      > collection.[/color]

      ..NET is quite greedy with memory.. but it does play fair. When you have lots
      of memory available it will allocate lots, when there is very little it will
      release what it doesn't need (like when you minimise the app).

      There's a demo in one of the TechEd 2003 speeches available online (I forget
      the address).

      -- Pete


      Comment

      • Willy Denoyette [MVP]

        #4
        Re: High memory usage

        See inline ****

        "Pete" <pvidler@gawab. com> wrote in message news:pG56b.521$ 06.486152@newsf ep2-gui.server.ntli .net...
        [color=blue]
        > .NET is quite greedy with memory.. but it does play fair. When you have lots
        > of memory available it will allocate lots, when there is very little it will
        > release what it doesn't need (like when you minimise the app).
        >[/color]

        **** Too much honor for the CLR, actually it's the OS who (tries to) reclaims the memory (trimming the WS) :-).
        [color=blue]
        > There's a demo in one of the TechEd 2003 speeches available online (I forget
        > the address).
        >
        > -- Pete
        >[/color]


        Willy.


        Comment

        • Philip Carnstam

          #5
          Re: High memory usage

          Is'nt there any way of solving this?
          Non DotNet applications are able to run on very low memory usage... There
          must be a way to lower the memory "costs" of running a DotNet application.

          The whole DotNet idea is ridiculous otherwise... Can I only have 10 home
          made DotNet applications active at once on a 128 MB Ram machine before the
          machine completely runs out of memory?
          Sounds mighty strange to me...

          Thankful for any answers I can get!

          "Nicholas Paldino [.NET/C# MVP]" <nicholas.paldi no@exisconsulti ng.com> wrote
          in message news:Oq8xby9cDH A.3448@TK2MSFTN GP11.phx.gbl...[color=blue]
          > Philip,
          >
          > You could reduce the working set down to zero using API calls, but it
          > will just creep back up. The reason why the memory is consumed is because
          > the runtime is using the memory for garbage collection.
          >
          > Hope this helps.
          >
          >
          > --
          > - Nicholas Paldino [.NET/C# MVP]
          > - nicholas.paldin o@exisconsultin g.com
          >
          > "Philip Carnstam" <philip.carnsta m@carnstam.net> wrote in message
          > news:%23Syq3q9c DHA.652@tk2msft ngp13.phx.gbl.. .[color=green]
          > > How come .Net applications use so much memory? Every application I[/color][/color]
          compile[color=blue][color=green]
          > > uses at least 10 MB of memory, even the ones consisting of only a form[/color][/color]
          and[color=blue][color=green]
          > > nothing else. If I minimize them though the memory usage drops to a[/color][/color]
          couple[color=blue][color=green]
          > > hundred KB. Why?
          > >
          > > Is there anything I should to to prevent this? I have compiled in[/color][/color]
          release[color=blue][color=green]
          > > and deactivated all forms of debugging, I think!
          > >
          > > Thanks,
          > > Philip
          > >
          > >[/color]
          >
          >[/color]


          Comment

          • happyH

            #6
            Re: High memory usage

            I was under the impression that the working set was the physical memory
            usage of the application...

            When you minimise the application, dosnt that kick on the OS to page the
            memory to harddisk..

            I did a test sometime back.. I created a huge array and filled it with
            random garbage. Then told it to wait for a key press. I minimised the page
            and opened it up again and checked its memory usage. The memory usage by
            the app was not enough to hold the array of garbage i stored in the array.
            Then i pressed a key and the memory usage jumped up while it was outputting
            the garbage back to the screeen. This to me indicates that when i minimised
            it, the app had written it to disk reducing the working set. When i started
            it back up again, the data was retrieved from disk and output to screen...

            Cheers
            HappyH

            "Philip Carnstam" <philip.carnsta m@carnstam.net> wrote in message
            news:uVqnUe$cDH A.2460@TK2MSFTN GP10.phx.gbl...[color=blue]
            > Is'nt there any way of solving this?
            > Non DotNet applications are able to run on very low memory usage... There
            > must be a way to lower the memory "costs" of running a DotNet application.
            >
            > The whole DotNet idea is ridiculous otherwise... Can I only have 10 home
            > made DotNet applications active at once on a 128 MB Ram machine before the
            > machine completely runs out of memory?
            > Sounds mighty strange to me...
            >
            > Thankful for any answers I can get!
            >
            > "Nicholas Paldino [.NET/C# MVP]" <nicholas.paldi no@exisconsulti ng.com>[/color]
            wrote[color=blue]
            > in message news:Oq8xby9cDH A.3448@TK2MSFTN GP11.phx.gbl...[color=green]
            > > Philip,
            > >
            > > You could reduce the working set down to zero using API calls, but[/color][/color]
            it[color=blue][color=green]
            > > will just creep back up. The reason why the memory is consumed is[/color][/color]
            because[color=blue][color=green]
            > > the runtime is using the memory for garbage collection.
            > >
            > > Hope this helps.
            > >
            > >
            > > --
            > > - Nicholas Paldino [.NET/C# MVP]
            > > - nicholas.paldin o@exisconsultin g.com
            > >
            > > "Philip Carnstam" <philip.carnsta m@carnstam.net> wrote in message
            > > news:%23Syq3q9c DHA.652@tk2msft ngp13.phx.gbl.. .[color=darkred]
            > > > How come .Net applications use so much memory? Every application I[/color][/color]
            > compile[color=green][color=darkred]
            > > > uses at least 10 MB of memory, even the ones consisting of only a form[/color][/color]
            > and[color=green][color=darkred]
            > > > nothing else. If I minimize them though the memory usage drops to a[/color][/color]
            > couple[color=green][color=darkred]
            > > > hundred KB. Why?
            > > >
            > > > Is there anything I should to to prevent this? I have compiled in[/color][/color]
            > release[color=green][color=darkred]
            > > > and deactivated all forms of debugging, I think!
            > > >
            > > > Thanks,
            > > > Philip
            > > >
            > > >[/color]
            > >
            > >[/color]
            >
            >[/color]


            Comment

            • Philip Carnstam

              #7
              Re: High memory usage

              That's all great, but what about other apps while I have the DotNet app up?
              I find it very, very strange that an application consisting of nothing but
              an empty form would use 10 MB of memory...
              Take for example Solitaire, it uses 3 MB of memory while viewed, it simply
              can't be that DotNet applications would use 3x more memory than that even
              though they do not do anything... If so, DotNet applications are worthless
              on all but computers with memory availibility beyond 512MB.


              "happyH" <happyh@no_than ks.org> wrote in message
              news:Wfb6b.4410 $cg.205607@news 02.tsnz.net...[color=blue]
              > I was under the impression that the working set was the physical memory
              > usage of the application...
              >
              > When you minimise the application, dosnt that kick on the OS to page the
              > memory to harddisk..
              >
              > I did a test sometime back.. I created a huge array and filled it with
              > random garbage. Then told it to wait for a key press. I minimised the[/color]
              page[color=blue]
              > and opened it up again and checked its memory usage. The memory usage by
              > the app was not enough to hold the array of garbage i stored in the array.
              > Then i pressed a key and the memory usage jumped up while it was[/color]
              outputting[color=blue]
              > the garbage back to the screeen. This to me indicates that when i[/color]
              minimised[color=blue]
              > it, the app had written it to disk reducing the working set. When i[/color]
              started[color=blue]
              > it back up again, the data was retrieved from disk and output to screen...
              >
              > Cheers
              > HappyH
              >
              > "Philip Carnstam" <philip.carnsta m@carnstam.net> wrote in message
              > news:uVqnUe$cDH A.2460@TK2MSFTN GP10.phx.gbl...[color=green]
              > > Is'nt there any way of solving this?
              > > Non DotNet applications are able to run on very low memory usage...[/color][/color]
              There[color=blue][color=green]
              > > must be a way to lower the memory "costs" of running a DotNet[/color][/color]
              application.[color=blue][color=green]
              > >
              > > The whole DotNet idea is ridiculous otherwise... Can I only have 10 home
              > > made DotNet applications active at once on a 128 MB Ram machine before[/color][/color]
              the[color=blue][color=green]
              > > machine completely runs out of memory?
              > > Sounds mighty strange to me...
              > >
              > > Thankful for any answers I can get!
              > >
              > > "Nicholas Paldino [.NET/C# MVP]" <nicholas.paldi no@exisconsulti ng.com>[/color]
              > wrote[color=green]
              > > in message news:Oq8xby9cDH A.3448@TK2MSFTN GP11.phx.gbl...[color=darkred]
              > > > Philip,
              > > >
              > > > You could reduce the working set down to zero using API calls, but[/color][/color]
              > it[color=green][color=darkred]
              > > > will just creep back up. The reason why the memory is consumed is[/color][/color]
              > because[color=green][color=darkred]
              > > > the runtime is using the memory for garbage collection.
              > > >
              > > > Hope this helps.
              > > >
              > > >
              > > > --
              > > > - Nicholas Paldino [.NET/C# MVP]
              > > > - nicholas.paldin o@exisconsultin g.com
              > > >
              > > > "Philip Carnstam" <philip.carnsta m@carnstam.net> wrote in message
              > > > news:%23Syq3q9c DHA.652@tk2msft ngp13.phx.gbl.. .
              > > > > How come .Net applications use so much memory? Every application I[/color]
              > > compile[color=darkred]
              > > > > uses at least 10 MB of memory, even the ones consisting of only a[/color][/color][/color]
              form[color=blue][color=green]
              > > and[color=darkred]
              > > > > nothing else. If I minimize them though the memory usage drops to a[/color]
              > > couple[color=darkred]
              > > > > hundred KB. Why?
              > > > >
              > > > > Is there anything I should to to prevent this? I have compiled in[/color]
              > > release[color=darkred]
              > > > > and deactivated all forms of debugging, I think!
              > > > >
              > > > > Thanks,
              > > > > Philip
              > > > >
              > > > >
              > > >
              > > >[/color]
              > >
              > >[/color]
              >
              >[/color]


              Comment

              • Pete

                #8
                Re: High memory usage

                Hi,

                Philip Carnstam wrote:[color=blue]
                > The whole DotNet idea is ridiculous otherwise... Can I only have 10
                > home made DotNet applications active at once on a 128 MB Ram machine
                > before the machine completely runs out of memory?
                > Sounds mighty strange to me...[/color]

                There are two things to consider here:

                1) In low memory conditions your application will use less memory (try
                opening many high memory usage applications and see for yourself). You get a
                similar effect when you application is minimised and restored.

                2) Most of that memory usage is the framework itself.. which *should* be
                shared between applications running at the same time (someone correct me if
                I'm wrong with this). If I'm right on this, having many .NET apps open at
                once should take less memory than having many (similar) non-.net apps open.

                Basically ignore what the task manager is telling you and just write your
                program.

                -- Pete


                Comment

                • Willy Denoyette [MVP]

                  #9
                  Re: High memory usage

                  Each program has to load the CLR runtime, the Jitter, the C runtime library and some Win32 libraries, most of these are SHARED
                  libraries. The CLR also reserves memory for the GC heap
                  Your minimal application also has to load mscorlib and the windows.forms package.
                  90% of this 10 MB has been taken by these libs. So a much larger application will not take much more memory unless you are creating
                  a lot of (or large) objects.

                  Willy.

                  "Philip Carnstam" <philip.carnsta m@carnstam.net> wrote in message news:O0VyuuEdDH A.2368@TK2MSFTN GP09.phx.gbl...[color=blue]
                  > That's all great, but what about other apps while I have the DotNet app up?
                  > I find it very, very strange that an application consisting of nothing but
                  > an empty form would use 10 MB of memory...
                  > Take for example Solitaire, it uses 3 MB of memory while viewed, it simply
                  > can't be that DotNet applications would use 3x more memory than that even
                  > though they do not do anything... If so, DotNet applications are worthless
                  > on all but computers with memory availibility beyond 512MB.
                  >
                  >
                  > "happyH" <happyh@no_than ks.org> wrote in message
                  > news:Wfb6b.4410 $cg.205607@news 02.tsnz.net...[color=green]
                  > > I was under the impression that the working set was the physical memory
                  > > usage of the application...
                  > >
                  > > When you minimise the application, dosnt that kick on the OS to page the
                  > > memory to harddisk..
                  > >
                  > > I did a test sometime back.. I created a huge array and filled it with
                  > > random garbage. Then told it to wait for a key press. I minimised the[/color]
                  > page[color=green]
                  > > and opened it up again and checked its memory usage. The memory usage by
                  > > the app was not enough to hold the array of garbage i stored in the array.
                  > > Then i pressed a key and the memory usage jumped up while it was[/color]
                  > outputting[color=green]
                  > > the garbage back to the screeen. This to me indicates that when i[/color]
                  > minimised[color=green]
                  > > it, the app had written it to disk reducing the working set. When i[/color]
                  > started[color=green]
                  > > it back up again, the data was retrieved from disk and output to screen...
                  > >
                  > > Cheers
                  > > HappyH
                  > >
                  > > "Philip Carnstam" <philip.carnsta m@carnstam.net> wrote in message
                  > > news:uVqnUe$cDH A.2460@TK2MSFTN GP10.phx.gbl...[color=darkred]
                  > > > Is'nt there any way of solving this?
                  > > > Non DotNet applications are able to run on very low memory usage...[/color][/color]
                  > There[color=green][color=darkred]
                  > > > must be a way to lower the memory "costs" of running a DotNet[/color][/color]
                  > application.[color=green][color=darkred]
                  > > >
                  > > > The whole DotNet idea is ridiculous otherwise... Can I only have 10 home
                  > > > made DotNet applications active at once on a 128 MB Ram machine before[/color][/color]
                  > the[color=green][color=darkred]
                  > > > machine completely runs out of memory?
                  > > > Sounds mighty strange to me...
                  > > >
                  > > > Thankful for any answers I can get!
                  > > >
                  > > > "Nicholas Paldino [.NET/C# MVP]" <nicholas.paldi no@exisconsulti ng.com>[/color]
                  > > wrote[color=darkred]
                  > > > in message news:Oq8xby9cDH A.3448@TK2MSFTN GP11.phx.gbl...
                  > > > > Philip,
                  > > > >
                  > > > > You could reduce the working set down to zero using API calls, but[/color]
                  > > it[color=darkred]
                  > > > > will just creep back up. The reason why the memory is consumed is[/color]
                  > > because[color=darkred]
                  > > > > the runtime is using the memory for garbage collection.
                  > > > >
                  > > > > Hope this helps.
                  > > > >
                  > > > >
                  > > > > --
                  > > > > - Nicholas Paldino [.NET/C# MVP]
                  > > > > - nicholas.paldin o@exisconsultin g.com
                  > > > >
                  > > > > "Philip Carnstam" <philip.carnsta m@carnstam.net> wrote in message
                  > > > > news:%23Syq3q9c DHA.652@tk2msft ngp13.phx.gbl.. .
                  > > > > > How come .Net applications use so much memory? Every application I
                  > > > compile
                  > > > > > uses at least 10 MB of memory, even the ones consisting of only a[/color][/color]
                  > form[color=green][color=darkred]
                  > > > and
                  > > > > > nothing else. If I minimize them though the memory usage drops to a
                  > > > couple
                  > > > > > hundred KB. Why?
                  > > > > >
                  > > > > > Is there anything I should to to prevent this? I have compiled in
                  > > > release
                  > > > > > and deactivated all forms of debugging, I think!
                  > > > > >
                  > > > > > Thanks,
                  > > > > > Philip
                  > > > > >
                  > > > > >
                  > > > >
                  > > > >
                  > > >
                  > > >[/color]
                  > >
                  > >[/color]
                  >
                  >[/color]


                  Comment

                  • Randy A. Ynchausti

                    #10
                    Re: High memory usage

                    Pete,
                    [color=blue]
                    > Philip Carnstam wrote:[color=green]
                    > > The whole DotNet idea is ridiculous otherwise... Can I only have 10
                    > > home made DotNet applications active at once on a 128 MB Ram machine
                    > > before the machine completely runs out of memory?
                    > > Sounds mighty strange to me...[/color][/color]

                    [snip]
                    [color=blue]
                    > Basically ignore what the task manager is telling you and just write your
                    > program.[/color]

                    By-the-way --> The task manager does lie at times about the memory
                    consumption. It can not be trusted to give the exact information all the
                    time.

                    Regards,

                    Randy


                    Comment

                    • Andrew Walsh

                      #11
                      Re: High memory usage

                      "Philip Carnstam" <philip.carnsta m@carnstam.net> wrote in message news:<O0VyuuEdD HA.2368@TK2MSFT NGP09.phx.gbl>. ..[color=blue]
                      > If so, DotNet applications are worthless
                      > on all but computers with memory availibility beyond 512MB.
                      >[/color]

                      If you like your apps lean and quick, I doubt DotNet is
                      the tool you want to use at this point of its evolution.

                      look at C, C++, Delphi...

                      The Next Big Thing isn't the always the right hammer for every nail.

                      Comment

                      • Jon Skeet

                        #12
                        Re: High memory usage

                        Willy Denoyette [MVP] <willy.denoyett e@pandora.be> wrote:[color=blue]
                        > See inline ****
                        >
                        > "Pete" <pvidler@gawab. com> wrote:
                        >[color=green]
                        > > .NET is quite greedy with memory.. but it does play fair. When
                        > > you have lots of memory available it will allocate lots, when
                        > > there is very little it will release what it doesn't need (like
                        > > when you minimise the app).[/color]
                        >
                        > **** Too much honor for the CLR, actually it's the OS who
                        > (tries to) reclaims the memory (trimming the WS) :-).[/color]

                        Well, it's not *just* the OS here. The CLR responds to memory
                        requirements of other apps by garbage collecting appropriately (when it
                        might not bother if there's plenty of memory available).

                        --
                        Jon Skeet - <skeet@pobox.co m>
                        Pobox has been discontinued as a separate service, and all existing customers moved to the Fastmail platform.

                        If replying to the group, please do not mail me too

                        Comment

                        • Philip Carnstam

                          #13
                          Re: High memory usage

                          The problem is that DotNet does do alot of the things I want the application
                          to do easily, for example, being able to use xml documents as data
                          sources... I only find it strange that the memory usage is so high, but I
                          guess I'm stuck with that fact...

                          Thanks for all the response!

                          "Andrew Walsh" <walsha2000@hot mail.com> wrote in message
                          news:52d66e1f.0 309061907.1fee0 173@posting.goo gle.com...[color=blue]
                          > "Philip Carnstam" <philip.carnsta m@carnstam.net> wrote in message[/color]
                          news:<O0VyuuEdD HA.2368@TK2MSFT NGP09.phx.gbl>. ..[color=blue][color=green]
                          > > If so, DotNet applications are worthless
                          > > on all but computers with memory availibility beyond 512MB.
                          > >[/color]
                          >
                          > If you like your apps lean and quick, I doubt DotNet is
                          > the tool you want to use at this point of its evolution.
                          >
                          > look at C, C++, Delphi...
                          >
                          > The Next Big Thing isn't the always the right hammer for every nail.[/color]


                          Comment

                          • Austin Ehlers

                            #14
                            Re: High memory usage

                            In addition to what everyone else said, here's an example of just how
                            many files are loaded into memory. It's a simple little WinForm to
                            get the MD5 checksum. The files that are loaded are:

                            c:\winnt\system 32\MPR.DLL
                            c:\winnt\system 32\ADVAPI32.DLL
                            c:\winnt\system 32\KERNEL32.DLL
                            c:\winnt\system 32\MSCOREE.DLL
                            c:\winnt\system 32\NTDLL.DLL
                            c:\winnt\system 32\RPCRT4.DLL
                            c:\winnt\system 32\ACTIVEDS.DLL
                            c:\winnt\system 32\ADSLDPC.DLL
                            c:\winnt\system 32\CABINET.DLL
                            c:\winnt\system 32\COMCTL32.DLL
                            c:\winnt\system 32\COMDLG32.DLL
                            c:\winnt\system 32\CRYPT32.DLL
                            c:\winnt\system 32\DBGHELP.DLL
                            c:\winnt\system 32\DNSAPI.DLL
                            c:\winnt\system 32\GDI32.DLL
                            c:\winnt\system 32\IMAGEHLP.DLL
                            c:\winnt\system 32\LZ32.DLL
                            c:\winnt\system 32\MLANG.DLL
                            c:\winnt\system 32\MSASN1.DLL
                            c:\winnt\system 32\MSI.DLL
                            c:\winnt\system 32\MSVCRT.DLL
                            c:\winnt\system 32\NETAPI32.DLL
                            c:\winnt\system 32\NETRAP.DLL
                            c:\winnt\system 32\NTDSAPI.DLL
                            c:\winnt\system 32\OLE32.DLL
                            c:\winnt\system 32\OLEAUT32.DLL
                            c:\winnt\system 32\SAMLIB.DLL
                            c:\winnt\system 32\SECUR32.DLL
                            c:\winnt\system 32\SETUPAPI.DLL
                            c:\winnt\system 32\SFC.DLL
                            c:\winnt\system 32\SFCFILES.DLL
                            c:\winnt\system 32\SHELL32.DLL
                            c:\winnt\system 32\SHLWAPI.DLL
                            c:\winnt\system 32\TAPI32.DLL
                            c:\winnt\system 32\URLMON.DLL
                            c:\winnt\system 32\USER32.DLL
                            c:\winnt\system 32\USERENV.DLL
                            c:\winnt\system 32\VERSION.DLL
                            c:\winnt\system 32\W32TOPL.DLL
                            c:\winnt\system 32\WININET.DLL
                            c:\winnt\system 32\WINMM.DLL
                            c:\winnt\system 32\WINSPOOL.DRV
                            c:\winnt\system 32\WINTRUST.DLL
                            c:\winnt\system 32\WLDAP32.DLL
                            c:\winnt\system 32\WS2_32.DLL
                            c:\winnt\system 32\WS2HELP.DLL
                            c:\winnt\system 32\WSOCK32.DLL

                            Austin Ehlers

                            On Fri, 5 Sep 2003 20:26:01 +0200, "Philip Carnstam"
                            <philip.carnsta m@carnstam.net> wrote:
                            [color=blue]
                            >How come .Net applications use so much memory? Every application I compile
                            >uses at least 10 MB of memory, even the ones consisting of only a form and
                            >nothing else. If I minimize them though the memory usage drops to a couple
                            >hundred KB. Why?
                            >
                            >Is there anything I should to to prevent this? I have compiled in release
                            >and deactivated all forms of debugging, I think!
                            >
                            >Thanks,
                            >Philip
                            >[/color]

                            Comment

                            • Willy Denoyette [MVP]

                              #15
                              Re: High memory usage


                              Jon,

                              While it's possible for the CLR to return virtual memory to the OS (Commited or reserved) by calling VirtualFree I never saw he did
                              under memory pressure. The only thing I see is that the OS trims the WS by returning unused (unaccessed) pages to swap file when
                              there is ample memory.
                              As to your remark "The CLR responds to memory requirements of other apps", how do you think the CLR knows about memory requirements
                              of other app's?

                              Willy.

                              "Jon Skeet" <skeet@pobox.co m> wrote in message news:MPG.19c4e2 ed3c69db3298a4b e@news.microsof t.com...[color=blue]
                              > Willy Denoyette [MVP] <willy.denoyett e@pandora.be> wrote:[color=green]
                              > > See inline ****
                              > >
                              > > "Pete" <pvidler@gawab. com> wrote:
                              > >[color=darkred]
                              > > > .NET is quite greedy with memory.. but it does play fair. When
                              > > > you have lots of memory available it will allocate lots, when
                              > > > there is very little it will release what it doesn't need (like
                              > > > when you minimise the app).[/color]
                              > >
                              > > **** Too much honor for the CLR, actually it's the OS who
                              > > (tries to) reclaims the memory (trimming the WS) :-).[/color]
                              >
                              > Well, it's not *just* the OS here. The CLR responds to memory
                              > requirements of other apps by garbage collecting appropriately (when it
                              > might not bother if there's plenty of memory available).
                              >
                              > --
                              > Jon Skeet - <skeet@pobox.co m>
                              > http://www.pobox.com/~skeet/
                              > If replying to the group, please do not mail me too[/color]


                              Comment

                              Working...