HighTechTalks DotNet Forums  

Re: when will .net application free the committed memory (or VM)

Dotnet Framework (Performance) microsoft.public.dotnet.framework.performance


Discuss Re: when will .net application free the committed memory (or VM) in the Dotnet Framework (Performance) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Phil Wilson
 
Posts: n/a

Default Re: when will .net application free the committed memory (or VM) - 01-05-2007 , 04:43 PM






I think this question comes down to when, if ever, does the managed heap get
reduced in size and the memory deallocated and returned to the OS. I don't
know the answer, but experience suggests that the answer is "hardly ever".
--
Phil Wilson
[Microsoft MVP Windows Installer]
"Surain Shen" <looong.shin (AT) gmail (DOT) com> wrote

Quote:
It's known, that .net app alloctes a block of memory and managed itselsf
(or by GC), and when gc do collect, it may not free the committed memory
immediately.

Who'd like tell me when will it REALLY free the memory. Any reply is
highly
appreciated!





Reply With Quote
  #2  
Old   
Chris Mullins [MVP]
 
Posts: n/a

Default Re: when will .net application free the committed memory (or VM) - 01-05-2007 , 06:25 PM






"Phil Wilson" <phil.wilson (AT) wonderware (DOT) something.com> wrote
Quote:
I think this question comes down to when, if ever, does the managed heap
get reduced in size and the memory deallocated and returned to the OS. I
don't know the answer, but experience suggests that the answer is "hardly
ever".
I'm not sure about the actual heap size, but we frequently see the Working
Set size (as reported by Task Manager) be reduced.

If I go through the excersize in our XMPP server to Log in 10,000 users I'll
see the memory on the server jump up to 320 megs or so. When I log the users
out, the memory goes down a fair bit.

--
Chris Mullins, MCSD.NET, MCPD:Enterprise, MVP C#
http://www.coversant.net/blogs/cmullins




Reply With Quote
  #3  
Old   
Phil Wilson
 
Posts: n/a

Default Re: when will .net application free the committed memory (or VM) - 01-08-2007 , 04:15 PM



I believe the OPs question is directed at individual processes. At that
level, a managed process could build a huge managed heap due to (say)
initialisation code. Then the app releases a lot of that memory but still
has that huge managed heap, so its Private Bytes value is still very large
but might be mostly unused managed heap. Does some of that unused managed
heap memory ever get returned back to the system? That's the issue.
--
Phil Wilson
[Microsoft MVP Windows Installer]
"Chris Mullins [MVP]" <cmullins (AT) yahoo (DOT) com> wrote

Quote:
"Phil Wilson" <phil.wilson (AT) wonderware (DOT) something.com> wrote
I think this question comes down to when, if ever, does the managed heap
get reduced in size and the memory deallocated and returned to the OS. I
don't know the answer, but experience suggests that the answer is "hardly
ever".

I'm not sure about the actual heap size, but we frequently see the Working
Set size (as reported by Task Manager) be reduced.

If I go through the excersize in our XMPP server to Log in 10,000 users
I'll see the memory on the server jump up to 320 megs or so. When I log
the users out, the memory goes down a fair bit.

--
Chris Mullins, MCSD.NET, MCPD:Enterprise, MVP C#
http://www.coversant.net/blogs/cmullins




Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.