Changeset 45566 in webkit


Ignore:
Timestamp:
Jul 6, 2009 2:13:59 PM (15 years ago)
Author:
adachan@apple.com
Message:

Reviewed by Darin Adler and Mark Rowe.

Decommitted spans are added to the list of normal spans rather than
the returned spans in TCMalloc_PageHeap::Delete().
https://bugs.webkit.org/show_bug.cgi?id=26998


In TCMalloc_PageHeap::Delete(), the deleted span can be decommitted in
the process of merging with neighboring spans that are also decommitted.
The merged span needs to be placed in the list of returned spans (spans
whose memory has been returned to the system). Right now it's always added
to the list of the normal spans which can theoretically cause thrashing.

  • wtf/FastMalloc.cpp: (WTF::TCMalloc_PageHeap::Delete):
Location:
trunk/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r45553 r45566  
     12009-07-06  Ada Chan  <adachan@apple.com>
     2
     3        Reviewed by Darin Adler and Mark Rowe.
     4
     5        Decommitted spans are added to the list of normal spans rather than
     6        the returned spans in TCMalloc_PageHeap::Delete().
     7        https://bugs.webkit.org/show_bug.cgi?id=26998
     8       
     9        In TCMalloc_PageHeap::Delete(), the deleted span can be decommitted in
     10        the process of merging with neighboring spans that are also decommitted. 
     11        The merged span needs to be placed in the list of returned spans (spans
     12        whose memory has been returned to the system).  Right now it's always added
     13        to the list of the normal spans which can theoretically cause thrashing. 
     14
     15        * wtf/FastMalloc.cpp:
     16        (WTF::TCMalloc_PageHeap::Delete):
     17
    1182009-07-05  Lars Knoll  <lars.knoll@nokia.com>
    219
  • trunk/JavaScriptCore/wtf/FastMalloc.cpp

    r44504 r45566  
    15271527  // entries for the pieces we are merging together because we only
    15281528  // care about the pagemap entries for the boundaries.
    1529   //
    1530   // Note that the spans we merge into "span" may come out of
    1531   // a "returned" list.  For simplicity, we move these into the
    1532   // "normal" list of the appropriate size class.
    15331529  const PageID p = span->start;
    15341530  const Length n = span->length;
     
    15611557  Event(span, 'D', span->length);
    15621558  span->free = 1;
    1563   if (span->length < kMaxPages) {
    1564     DLL_Prepend(&free_[span->length].normal, span);
    1565   } else {
    1566     DLL_Prepend(&large_.normal, span);
     1559#if TCMALLOC_TRACK_DECOMMITED_SPANS
     1560  if (span->decommitted) {
     1561    if (span->length < kMaxPages)
     1562      DLL_Prepend(&free_[span->length].returned, span);
     1563    else
     1564      DLL_Prepend(&large_.returned, span);
     1565  } else
     1566#endif
     1567  {
     1568    if (span->length < kMaxPages)
     1569      DLL_Prepend(&free_[span->length].normal, span);
     1570    else
     1571      DLL_Prepend(&large_.normal, span);
    15671572  }
    15681573  free_pages_ += n;
Note: See TracChangeset for help on using the changeset viewer.