RESOLVED FIXED111605
[Qt] QWebSettings::clearMemoryCaches should release FastMalloc's free pages to OS
https://bugs.webkit.org/show_bug.cgi?id=111605
Summary [Qt] QWebSettings::clearMemoryCaches should release FastMalloc's free pages t...
Arunprasad
Reported 2013-03-06 11:30:10 PST
Should behave like MemoryPressureHandler::releaseMemory @ MemoryPressureHandlerMac.mm. + WebCore::StorageThread::releaseFastMallocFreeMemoryInAllThreads(); +#if ENABLE(WORKERS) + WebCore::WorkerThread::releaseFastMallocFreeMemoryInAllThreads(); +#endif + WTF::releaseFastMallocFreeMemory();
Attachments
Patch (1.84 KB, patch)
2013-03-07 10:49 PST, Arunprasad Rajkumar
no flags
#include <wtf/Functional.h> inclusion is not needed (1.81 KB, patch)
2013-03-07 10:55 PST, Arunprasad Rajkumar
no flags
Arunprasad
Comment 1 2013-03-07 10:35:55 PST
WTF's FastMalloc(TCMalloc) logic implements memory management which is optimized for faster allocation and release. FastMalloc maintains free-list for each thread and one central list per process to avoid semaphore locking overhead(lock contention). Periodically thread specific free blocks will be moved to central free-list then it will be released back to system using special thread named "scavenger". Incase of memory pressure free-blocks scattered around threads should be released back to OS, so that other processes can use the memory. So modifying QWebSettings::clearMemoryCaches to call FastMalloc's page release functions. I will upload the patch soon.
Arunprasad Rajkumar
Comment 2 2013-03-07 10:49:09 PST
Arunprasad Rajkumar
Comment 3 2013-03-07 10:55:58 PST
Created attachment 192046 [details] #include <wtf/Functional.h> inclusion is not needed
Jocelyn Turcotte
Comment 4 2013-03-08 05:22:40 PST
Comment on attachment 192046 [details] #include <wtf/Functional.h> inclusion is not needed r=me
WebKit Review Bot
Comment 5 2013-03-08 05:45:59 PST
Comment on attachment 192046 [details] #include <wtf/Functional.h> inclusion is not needed Clearing flags on attachment: 192046 Committed r145211: <http://trac.webkit.org/changeset/145211>
WebKit Review Bot
Comment 6 2013-03-08 05:46:03 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.