[Webkit-unassigned] [Bug 31675] New: Acute disposophobia : Garbage collector not collecting garbage.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 19 10:16:22 PST 2009


https://bugs.webkit.org/show_bug.cgi?id=31675

           Summary: Acute disposophobia : Garbage collector not collecting
                    garbage.
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Macintosh Intel
        OS/Version: Mac OS X 10.6
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: jorgechamorro at mac.com


Hi,

I've run this code in Safari, FF, Opera & Chrome (*). Only Safari fails to GC
a's old content: I've been running it in the consoles (just in case it
matters).

//Create an array of 8M elements and fill each element with an empty string:

a= new Array(Math.pow(2,23)); n= a.length; while(n--){a[n]="";}; n= a.length;

//Repeat again a few times more until it hangs/stops responding (happens both
in Safari and in any nightly build):

a= new Array(Math.pow(2,23)); n= a.length; while(n--){a[n]="";}; n= a.length;
a= new Array(Math.pow(2,23)); n= a.length; while(n--){a[n]="";}; n= a.length;
a= new Array(Math.pow(2,23)); n= a.length; while(n--){a[n]="";}; n= a.length;
a= new Array(Math.pow(2,23)); n= a.length; while(n--){a[n]="";}; n= a.length;
a= new Array(Math.pow(2,23)); n= a.length; while(n--){a[n]="";}; n= a.length;

a's old content should eventually be GC'ed, but it isn't and accumulates on
each run: it can be seen with a "top" or in the activity monitor. Other
browsers do it well.

BTW, why does each array element use so much memory ?
This 8M array filled with "" occupies over 5x more memory in Safari than in
Chrome or in Opera. (!)

Cheers,
(*)FF2.0.0.20, FF3.0.13, FF3.5.4, FF3.6b2, Chrome 4.0.249.0, Opera 10.01.
-- 
jorge at jorgechamorro.com

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list