<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>22275</bug_id>
          
          <creation_ts>2008-11-14 20:06:42 -0800</creation_ts>
          <short_desc>Return memory more aggressively when large amount of memory has been freed</short_desc>
          <delta_ts>2010-01-05 12:34:24 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Template Framework</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>28676</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Maciej Stachowiak">mjs</reporter>
          <assigned_to name="Stephanie Lewis">slewis</assigned_to>
          <cc>ggaren</cc>
    
    <cc>slewis</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>98846</commentid>
    <comment_count>0</comment_count>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2008-11-14 20:06:42 -0800</bug_when>
    <thetext>At the end of the Mozilla membuster test, FastMalloc has around 90M that is returnable to the system but hasn&apos;t been. We normally limit aggressiveness of our memory returning to avoid performance degradation. But we might be able to track when a very large amount of memory has been freed and scavange more aggressively in such cases only.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98847</commentid>
    <comment_count>1</comment_count>
    <who name="Stephanie Lewis">slewis</who>
    <bug_when>2008-11-14 20:15:01 -0800</bug_when>
    <thetext>I am looking into this.  The brute force method of releasing lots of memory during webview teardown doesn&apos;t seem to work the way we want.  I am working on teaching FastMalloc how to keep better track of its which memory it returned to the system and which memory it has free but still allocated to us.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99431</commentid>
    <comment_count>2</comment_count>
    <who name="Stephanie Lewis">slewis</who>
    <bug_when>2008-11-19 23:14:42 -0800</bug_when>
    <thetext>simply adding a bool to track which spans are returned to the system is a .5% sunspider regression

returning spans that are being merged to spans that have already been returned is an additional 1% sunspider regression.  

Without these improvements we don&apos;t keep accurate count of how much memory we have already returned to the system so any heuristic based on what memory we think we have will be skewed.  

On sunspider ~40% of the pages merged are returned memory so the skew is significant.

As a side note, tracking and merging returned pages is also part of the problem with returning memory on windows.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>177307</commentid>
    <comment_count>3</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2010-01-05 12:34:24 -0800</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 28676 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>