Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge r180908 - bmalloc: Eagerly remove allocated objects from the fr…
…ee list https://bugs.webkit.org/show_bug.cgi?id=142194 Reviewed by Andreas Kling. This reduces the pressure to garbage collect the free list. Might be a 1% speedup on MallocBench. * bmalloc/FreeList.cpp: Put this comment at the top of the file instead of repeating it inside of each function. Tried to clarify the details. (bmalloc::FreeList::takeGreedy): Matched the other iteration code in this file for consistency -- even though either direction works fine in this function. (bmalloc::FreeList::take): Change to iterate from low to high so that we can maintain an index into the vector that is not disturbed even if we pop from the middle (which invalidates the last index in the vector). Decrement i when popping from the middle to make sure that we don't skip the next item after popping. (bmalloc::FreeList::removeInvalidAndDuplicateEntries): Ditto.
- Loading branch information
1 parent
7d5b913
commit 86d653e
Showing
2 changed files
with
65 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters