bmalloc should segregate medium-sized objects by line like it does for small-sized...
authorggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Sep 2014 20:58:02 +0000 (20:58 +0000)
committerggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Sep 2014 20:58:02 +0000 (20:58 +0000)
commitbfbe47e94d5c66610378865a512d27fc02a1dc78
tree5fe03a4084969e32c07b9370f47e56c7bdb09515
parent282380ed0346d707bd9441338b54c06c8c0f0cda
bmalloc should segregate medium-sized objects by line like it does for small-sized objects
https://bugs.webkit.org/show_bug.cgi?id=136693

Reviewed by Gavin Barraclough.

4% reduction in heap size on the MallocBench *_memory_warning benchmarks.

No throughput change.

We keep an array of medium allocators, just like our array of small
allocators.

In future, we can simplify the allocation fast path by merging the small
and medium allocator arrays. For now, this is the simplest change that
gets the win.

* bmalloc/Allocator.cpp:
(bmalloc::Allocator::Allocator):
(bmalloc::Allocator::scavenge):
(bmalloc::Allocator::allocateMedium):
* bmalloc/Allocator.h:
* bmalloc/Sizes.h:
(bmalloc::Sizes::mediumSizeClassFor):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@173538 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/bmalloc/ChangeLog
Source/bmalloc/bmalloc/Allocator.cpp
Source/bmalloc/bmalloc/Allocator.h
Source/bmalloc/bmalloc/Sizes.h