<div>In Chromium, we have various events that we&#39;d like to respond to by freeing as much memory as possible.  (One example is system sleep, where we&#39;d like to dump memory before sleeping to avoid having to page it back in after waking.)</div>
<div><br></div><div>I&#39;m trying to find what areas in WebCore are good candidates for this kind of work.  So far I&#39;ve found WebCore::Cache, which is a singleton per process, on which I can call setCapacity(..., ..., 0) to try and flush as much as possible.</div>
<div><br></div><div>It&#39;s also been suggested to me that the Glyph cache is a good candidate; I haven&#39;t quite figured out how this works, although I have found mitz&#39; recently-added showGlyphPageTree() function that I can probably use to do some investigation.</div>
<div><br></div><div>My questions are:</div><div>* I notice that even when I set the WebCore::Cache capacity to zero, I can&#39;t necessarily dump _everything_ out of it.  Is there some other set of calls I should make to drop more references somewhere?</div>
<div>* Does anyone already know the likely footprint of the Glyph cache, or how to clear it?</div><div>* Are there other obvious places to look?  Certainly the JS engine can hold a lot of memory, but that&#39;s outside the scope of this question; I&#39;m just looking in WebCore.  Any other caches I can dump?</div>
<div><br></div><div>Thanks,</div><div>PK</div>