Existing users, log in.  New users, create a free account.  Lost password?


MacFixIt Logo
 
Contact Us | About MacFixIt | Who's Online  

Page 1 of 2 1 2 >
Topic Options
#471726 - 06/09/09 07:09 AM Safari 4.0 & Memory Leak
pendragon Offline
MacAuthor

Registered: 11/14/99
Posts: 1565
Loc: Georgetown, TX, USA
The (serious?) memory leak continues in Safari 4.0, at least for me.

After quitting Safari and relaunching, I can open Activity Monitor and watch the both the Real Memory and Virtual Memory rise. Of course, the more pages I surf/the longer Safari is open, the greater the leak. Fortunately, I see no adverse effects from this leak (yet).

I found no solution other than quitting and then restarting Safari.

Bad conclusions on my part, or is there a memory leak fix?
_________________________
Harv
24" Intel (Core 2 Duo) iMac, 10.5.7

Those who can make you believe absurdities can make you commit atrocities. ~Voltaire

Top
#471733 - 06/09/09 07:47 AM Re: Safari 4.0 & Memory Leak [Re: pendragon]
joemikeb Offline
Moderator

Registered: 03/27/00
Posts: 11987
Loc: Fort Worth, That's my town
I am not seeing the (serious?) memory leak you are in Safari 4 running under OS X 10.5.7 on 24" 3.06 GHz iMac with 4 GB of RAM. In fact I just quit Safari 4, opened Activity Monitor and then launched Safari 4 again. When Safari 4 first launched there was an expected increase in the VM size but then it steadied and remained constant for several minutes. To my surprise, as I was drafting this post, the VM size actually decreased and in fact continues to decrease. Now it is occasionally changing on the order of ± .02 GB due I am sure to some background task in the OS.

No offense, but I wonder if you could possibly be misinterpreting what you are seeing in Activity Monitor. If you haven't done so before, you might take a look at my page on reading Activity Monitor it is slightly out of date with the latest version of Activity Monitor, but it is still a relatively accurate portrayal of Virtual Memory in OS X.
_________________________
The MacFixIt Forums will change to a read-only format on August 4, 2009
hopefully you will be able to find your answer elsewhere after that time.

joemikeb, Alternaut, Cyn, Dianne, DKMarsh, & MacManiac: MacFixit Forums Moderators



Top
#471753 - 06/09/09 10:30 AM Re: Safari 4.0 & Memory Leak [Re: joemikeb]
pendragon Offline
MacAuthor

Registered: 11/14/99
Posts: 1565
Loc: Georgetown, TX, USA
Joe,

Not to worry re offending me. Many/most of my problems are the result of what I know to be true, but really ain't so-

I checked your link, and indeed it was helpful, but confusion still reigns.

Perhaps an example will help:
After quitting and relaunching Safari, my Activity Monitor for Safari 4.0 read:
• Real Memory: 35.31 MB
• Virtual Memory: 964.02 MB

Seventy-five minutes later, it read:
• Real Memory 114.84: MB
• Virtual Memory: 1.05 GB

The intervening 75 minutes was with (only) moderate surfing.

Clearly I'm doing something wrong, I just don't know what...
_________________________
Harv
24" Intel (Core 2 Duo) iMac, 10.5.7

Those who can make you believe absurdities can make you commit atrocities. ~Voltaire

Top
#471754 - 06/09/09 10:34 AM Re: Safari 4.0 & Memory Leak [Re: pendragon]
Hal Itosis Offline
MacWizard

Registered: 08/23/99
Posts: 7032
Loc: 10.5.7 (build 9J61)
Originally Posted By: pendragon
I found no solution other than quitting and then restarting Safari.

But... if nothing else is requesting RAM, then why should Safari release it?
I.e., are you having trouble with any programs being starved for memory?

The new wisdom is: unused RAM is *wasted* RAM.
If Safari is still open, it may well need that space.
Holding onto it means it's ready/available quicker.

Top
#471774 - 06/09/09 12:19 PM Re: Safari 4.0 & Memory Leak [Re: Hal Itosis]
tacit Offline
MacGuru

Registered: 10/14/99
Posts: 12002
Loc: Portland, Oregon, USA
Originally Posted By: Hal Itosis
Originally Posted By: pendragon
I found no solution other than quitting and then restarting Safari.

But... if nothing else is requesting RAM, then why should Safari release it?
I.e., are you having trouble with any programs being starved for memory?

The new wisdom is: unused RAM is *wasted* RAM.
If Safari is still open, it may well need that space.
Holding onto it means it's ready/available quicker.


The problem with Safari in the past has been that as time goes on, it continually allocates more and more memory which it never lets go of once it's finished, even if other programs ask for it. There's a flaw in its memory management where it will allocate RAM for a temporary purpose, then not release it when it's done usin it, but also not re-use the same memory if it needs more--that memory is held by Safari but never used again.

If you have the habits I do--not restarting your computer for weeks or months at a time, and leaving Safari running with two dozen windows open at a time--then eventually Safari will consume all available resources and your system will become virtually unusable until you quit Safari.
_________________________
---
Photo gallery, all about me, and more: www.xeromag.com/franklin.html
RIP MacFixIt! New Mac forum: finetunedmac

Top
#471779 - 06/09/09 01:36 PM Re: Safari 4.0 & Memory Leak [Re: pendragon]
macnerd10 Offline
MacAuthor

Registered: 12/27/01
Posts: 2217
Loc: Los Angeles, CA, USA
Looks like this issue has been confirmed today at MacFixit main page.
_________________________
Alex
2.66 GHz 17" MacBook Pro, 4 GB RAM, OS 10.5.7, Office 2008, TimeWarner Cable

Top
#471780 - 06/09/09 01:55 PM Re: Safari 4.0 & Memory Leak [Re: macnerd10]
jchuzi Offline
Postaholic

Registered: 12/19/03
Posts: 22309
Loc: New York
Maybe its just my usage (I generally have only Safari and Entourage open at one time) but Activity Monitor is not showing anything untoward with Safari. As I type this, CPU goes from 1.0 to 2.4 and back with 17 threads, using 140 MB of real memory although virtual memory is at 1.16 GB. If I click in the AM window to make it active, Safari's CPU goes to 0.


Edited by jchuzi (06/09/09 01:56 PM)
_________________________
Jon

Mac Pro Quad 2.66 GHz, one 500 GB Hitachi HD, three 320 GB Hitachi HDs, 5 GB RAM, OS 10.5.7
Epson SP 1280, LaCie 80 GB FW drive, second internal DVD drive (Pioneer), Photoshop CS3, Office 2008,
Nikon LS 8000 scanner
Apple 23" Cinema Display

Top
#471783 - 06/09/09 02:22 PM Re: Safari 4.0 & Memory Leak [Re: jchuzi]
Hal Itosis Offline
MacWizard

Registered: 08/23/99
Posts: 7032
Loc: 10.5.7 (build 9J61)
I also frequently clear out Safari's cache and history... as well as having the RSS feed stuff virtually shut down.

Current stats (oh yeah, i do restart almost daily):

 name    cpu-time   threads      real       virtual      private       shared

 Safari   1:58.81     12     52.29 MB     435.07 MB     16.04 MB     29.43 MB

Top
#471787 - 06/09/09 02:46 PM Re: Safari 4.0 & Memory Leak [Re: Hal Itosis]
macnerd10 Offline
MacAuthor

Registered: 12/27/01
Posts: 2217
Loc: Los Angeles, CA, USA
Mine is like this (2.3 GHz DP PPC G5, 1 GB RAM, OS 10.5.7):
Threads: 9
Real memory: 24 MB
Virtual memory: 810 MB
This is on a standstill (no surfing).
This looks similar to Pendragon's relaunch status.
P.S. On a positive note, version 4.0 loads pages even faster than iCab.


Edited by macnerd10 (06/09/09 05:14 PM)
_________________________
Alex
2.66 GHz 17" MacBook Pro, 4 GB RAM, OS 10.5.7, Office 2008, TimeWarner Cable

Top
#471795 - 06/09/09 03:26 PM Re: Safari 4.0 & Memory Leak [Re: Hal Itosis]
dkmarsh Moderator Offline
Moderator

Registered: 09/29/00
Posts: 8623
Loc: SE PA

Quote:
I also frequently clear out Safari's cache and history..

Same here...a habit from the days when Safari's memory management was a real problem for Tiger on 512 MB of RAM.

To be honest, I haven't noticed significant memory issues with Safari since v. 3.0, even though I'm maxed out at only 1 GB. Of course, I tend to avoid Flash in particular and videos in general, both of which seem to run up memory usage in a hurry.

On the other hand, Safari is usually relegated to waiting in the background for use with those sites which Camino doesn't handle well (like my router management page!)...but when I do switch back to it after a lengthy period of dormancy, it takes a long time for its window(s) to appear, which suggests to me that it has properly paged out to disk and relinquished some of its RAM allocation.
_________________________

dkmarshmacfixit forums moderator

For Macintosh troubleshooting help in the MacFixIt Forums tradition, please visit Fine Tuned Mac.

Top
Page 1 of 2 1 2 >


Moderator:  alternaut, dianne, dkmarsh 

VersionTracker: Software Updates and Downloads | iPhone Atlas: iPhone Help, News, Tutorials, and Tips