Changeset 66538 in webkit for trunk/JavaScriptCore/wtf/FastMalloc.cpp
- Timestamp:
- Aug 31, 2010, 2:34:43 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/wtf/FastMalloc.cpp
r65311 r66538 1547 1547 // If the span size is bigger than kMinSpanListsWithSpans pages return all the spans in the list, else return all but 1 span. 1548 1548 // Return only 50% of a spanlist at a time so spans of size 1 are not the only ones left. 1549 size_t numSpansToReturn = (i > kMinSpanListsWithSpans) ? DLL_Length(&slist->normal) : static_cast<size_t>(.5 * DLL_Length(&slist->normal)); 1549 size_t length = DLL_Length(&slist->normal); 1550 size_t numSpansToReturn = (i > kMinSpanListsWithSpans) ? length : length / 2; 1550 1551 for (int j = 0; static_cast<size_t>(j) < numSpansToReturn && !DLL_IsEmpty(&slist->normal) && free_committed_pages_ > targetPageCount; j++) { 1551 1552 Span* s = slist->normal.prev;
Note:
See TracChangeset
for help on using the changeset viewer.