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).
Created attachment 54775 [details] patch Attaching Patch.
Attachment 54775 [details] did not build on mac: Build output: http://webkit-commit-queue.appspot.com/results/1792206
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.
Created attachment 54776 [details] second patch fixed some issues.
Attachment 54776 [details] did not build on mac: Build output: http://webkit-commit-queue.appspot.com/results/1935031
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
Created attachment 54841 [details] patch with correct fix and now it builds on 32bit
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.
Created attachment 54971 [details] patch one more time
Comment on attachment 54971 [details] patch r=me You can just declare "j" to be size_t, to avoid the static_cast.
Committed http://trac.webkit.org/changeset/58730