RESOLVED FIXED 38368
When FastMalloc Returns memory often left with lots of small spans
https://bugs.webkit.org/show_bug.cgi?id=38368
Summary When FastMalloc Returns memory often left with lots of small spans
Stephanie Lewis
Reported 2010-04-29 19:44:07 PDT
When FastMalloc Returns memory we're often left with lots of 1 page spans and none of the large sizes. Change the scavenging algorithm to always keep some large size spans around. Also change it distribute the returns among the list more equally. <rdar://problem/7834433> REGRESSSION: 1.5% PLT regression due to 56028 (return memory quicker).
Attachments
patch (4.00 KB, patch)
2010-04-29 19:53 PDT, Stephanie Lewis
no flags
second patch (4.02 KB, patch)
2010-04-29 20:23 PDT, Stephanie Lewis
eric: review-
patch with correct fix (4.02 KB, patch)
2010-04-30 17:39 PDT, Stephanie Lewis
ggaren: review-
patch (4.04 KB, patch)
2010-05-03 15:52 PDT, Stephanie Lewis
ggaren: review+
Stephanie Lewis
Comment 1 2010-04-29 19:53:54 PDT
Created attachment 54775 [details] patch Attaching Patch.
Eric Seidel (no email)
Comment 2 2010-04-29 20:05:50 PDT
WebKit Review Bot
Comment 3 2010-04-29 20:06:46 PDT
Attachment 54775 [details] did not pass style-queue: Failed to run "['WebKitTools/Scripts/check-webkit-style', '--no-squash']" exit_code: 1 JavaScriptCore/wtf/FastMalloc.cpp:1281: Missing spaces around / [whitespace/operators] [3] JavaScriptCore/wtf/FastMalloc.cpp:1546: Extra space before ) [whitespace/parens] [2] Total errors found: 2 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Stephanie Lewis
Comment 4 2010-04-29 20:23:10 PDT
Created attachment 54776 [details] second patch fixed some issues.
Eric Seidel (no email)
Comment 5 2010-04-29 20:28:15 PDT
Eric Seidel (no email)
Comment 6 2010-04-30 11:48:23 PDT
Comment on attachment 54776 [details] second patch The EWS thinks this will break leopard: fzzgiiisjukfwleasczjmdxaevcz/JavaScriptCorePrefix.h -c /Users/eseidel/Projects/MacEWS/JavaScriptCore/wtf/FastMalloc.cpp -o /Users/eseidel/Projects/MacEWS/WebKitBuild/JavaScriptCore.build/Release/JavaScriptCore.build/Objects-normal/i386/FastMalloc.o cc1plus: warnings being treated as errors /Users/eseidel/Projects/MacEWS/JavaScriptCore/wtf/FastMalloc.cpp:1281: warning: implicit conversion shortens 64-bit value into a 32-bit value /Users/eseidel/Projects/MacEWS/JavaScriptCore/wtf/FastMalloc.cpp: In member function ‘void WTF::TCMalloc_PageHeap::scavenge()’: /Users/eseidel/Projects/MacEWS/JavaScriptCore/wtf/FastMalloc.cpp:1546: warning: implicit conversion shortens 64-bit value into a 32-bit value distcc[85602] ERROR: compile /Users/eseidel/Projects/MacEWS/JavaScriptCore/wtf/FastMalloc.cpp on localhost failed
Stephanie Lewis
Comment 7 2010-04-30 17:39:22 PDT
Created attachment 54841 [details] patch with correct fix and now it builds on 32bit
Geoffrey Garen
Comment 8 2010-05-03 14:47:43 PDT
Comment on attachment 54841 [details] patch with correct fix I think the "l" postfix is wrong, since it will give you a long where you want a floating point number. The simplest way to appease the 64-bit warning is probably to use float, since it's 32-bit.
Stephanie Lewis
Comment 9 2010-05-03 15:52:42 PDT
Created attachment 54971 [details] patch one more time
Geoffrey Garen
Comment 10 2010-05-03 16:24:17 PDT
Comment on attachment 54971 [details] patch r=me You can just declare "j" to be size_t, to avoid the static_cast.
Stephanie Lewis
Comment 11 2010-05-03 19:40:42 PDT
Note You need to log in before you can comment on or make changes to this bug.