FastMalloc keeps some memory in per-thread caches (currently 2MB each). We currently flush these caches on memory warning for the main thread only. We should do it for other WebKit threads that use FastMalloc too.
<rdar://problem/12982020>
Created attachment 181944 [details] patch
Comment on attachment 181944 [details] patch Attachment 181944 [details] did not pass qt-ews (qt): Output: http://queues.webkit.org/results/15761561
Comment on attachment 181944 [details] patch Attachment 181944 [details] did not pass qt-wk2-ews (qt): Output: http://queues.webkit.org/results/15775422
Created attachment 181950 [details] patch2
Comment on attachment 181950 [details] patch2 I think you also want Cleanup() to call signalScavenger(). Otherwise, the memory will be in free lists in the central cache, but it won't necessarily get unmapped.
Comment on attachment 181950 [details] patch2 Attachment 181950 [details] did not pass win-ews (win): Output: http://queues.webkit.org/results/15760567
http://trac.webkit.org/changeset/139218
(In reply to comment #6) > (From update of attachment 181950 [details]) > I think you also want Cleanup() to call signalScavenger(). Otherwise, the memory will be in free lists in the central cache, but it won't necessarily get unmapped. That shouldn't be necessary. On memory warning we forcibly free the memory in central cache afterwards. Under normal circumstances just returning the spans should do sufficient amount of tickling.