Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
bmalloc: per-thread cache data structure should be smaller
https://bugs.webkit.org/show_bug.cgi?id=150218 Reviewed by Andreas Kling. Reduce the number of entries in the range cache because it's really big, and the bigness only helps in cases of serious fragmentation, and it only saves us a little bit of lock acquisition time. * bmalloc/Allocator.cpp: (bmalloc::Allocator::scavenge): (bmalloc::Allocator::refillAllocatorSlowCase): (bmalloc::Allocator::refillAllocator): (bmalloc::Allocator::allocateLarge): (bmalloc::Allocator::allocateSlowCase): (bmalloc::Allocator::allocateBumpRangeSlowCase): Deleted. (bmalloc::Allocator::allocateBumpRange): Deleted. * bmalloc/Allocator.h: Pass through the empty allocator and the range cache when refilling, and refill both. Otherwise, we always immediately pop the last item in the range cache, wasting that slot of capacity. * bmalloc/Heap.cpp: (bmalloc::Heap::allocateSmallBumpRanges): (bmalloc::Heap::allocateMediumBumpRanges): Account for the fact that the range cache is no longer big enough to guarantee that it can hold all the ranges in a page. (bmalloc::Heap::refillSmallBumpRangeCache): Deleted. (bmalloc::Heap::refillMediumBumpRangeCache): Deleted. * bmalloc/Heap.h: Move VMHeap to the end of the object because it contains a lot of unused / wasted space, and we want to pack our data together in memory. * bmalloc/Sizes.h: Make the range cache smaller. Canonical link: https://commits.webkit.org/168372@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191196 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
755cc39
commit 5fd3bb0
Showing
6 changed files
with
75 additions
and
19 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
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
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