Jump to content

Memory leaks


Recommended Posts

Memory leaks explained: http://en.wikipedia.org/wiki/Memory_leak

There have been mention of memory leaks in several threads recently, especially related to Firefox. I thought I should go into this in a few sentences. The above Wikipedia article explains it pretty good in details.

As a system software developer I know the causes and effects of "memory leaks" pretty well. It is basically memory allocated by an application, then never released (until the application ends). If this is done repeatedly in long running applications, this can show a tremendous amount of allocated memory building up over time (and it shows in the Task Manager).

However, this is not necessarily a totally bad thing, as unused memory is usually paged out to the virtual memory file, so it does not clog up the RAM. So the main effect may only be that the application will take some time to clean up the virtual memory as it terminates.

I think Firefox is especially afflicted with that malaise not because of bad programming, but most probably by the extensions and plug-ins. I will do some testing later with a plain Firefox (safe mode), and see if it uses the same amount of memory over time as FF running with all installed extensions.

All applications, by the way, are bound to have some memory leaks over time - including Internet Explorer. Sometimes because of programming bugs, sometimes intentional to keep certain information readily available, and sometimes it is simply unavoidable - e.g. when a subfunction unexpectedly crashes, but leaving the main application alive.

Link to comment
Share on other sites

I got lost. Not that technically minded where computers are concerned. Is this a long term building up problem, or is it all put right when we close down and start up again? That's all I really need to know.

Link to comment
Share on other sites

I got lost. Not that technically minded where computers are concerned. Is this a long term building up problem, or is it all put right when we close down and start up again? That's all I really need to know.

Having a sneaky try of firefox eh ? ;) ;) :lol:

Link to comment
Share on other sites

I think we're OK, andsome.

Regular shutting down (as we both do, I think) should keep us well un-leaked :)

Thanks.

I got lost. Not that technically minded where computers are concerned. Is this a long term building up problem, or is it all put right when we close down and start up again? That's all I really need to know.

Having a sneaky try of firefox eh ? ;) ;) :lol:

Tried ages ago and uninstalled.

Link to comment
Share on other sites

I got lost. Not that technically minded where computers are concerned. Is this a long term building up problem, or is it all put right when we close down and start up again? That's all I really need to know.

Memory allocations are done by applications as a request to the OS. This memory slot is recorded as belonging to the requesting application. If an application closes or crashes without explicitly releasing that memory, the OS will do it when the application terminates.

So all memory that has been requested by an application will be freed when it ends. There is no need to reboot Windows to reclaim leaked memory. Except, of course, for Windows itself - there are so many Windows processes and services that may also leak that we really need to reboot once in a while. I reboot Windows about once or twice a week.

Link to comment
Share on other sites

I got lost. Not that technically minded where computers are concerned. Is this a long term building up problem, or is it all put right when we close down and start up again? That's all I really need to know.

Memory allocations are done by applications as a request to the OS. This memory slot is recorded as belonging to the requesting application. If an application closes or crashes without explicitly releasing that memory, the OS will do it when the application terminates.

So all memory that has been requested by an application will be freed when it ends. There is no need to reboot Windows to reclaim leaked memory. Except, of course, for Windows itself - there are so many Windows processes and services that may also leak that we really need to reboot once in a while. I reboot Windows about once or twice a week.

When you say that you reboot Windows once or twice a week, do you mean that you leave the machine running 24/7. I close down every night and reboot every morning, unless asked to reboot more often after an install.

Link to comment
Share on other sites

Yes, my computers run constantly, for several reasons. One is that my spam filter on Outlook only works when Outlook is running. Another is that I run BOINC with ClimatePrediction, which would never finish a workunit in time if I shut down the system overnight. There is no harm in running a desktop PC or server 24/7. (I do shut down laptop computers when not in use).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy