[BMalloc] No need to delay deallocating chunks based on recent use
authormsaboff@apple.com <msaboff@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Mar 2019 17:43:29 +0000 (17:43 +0000)
committermsaboff@apple.com <msaboff@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Mar 2019 17:43:29 +0000 (17:43 +0000)
commita966eef7eeb1f3712e804e57d0b670b5bc6be6d4
treecca152628cdb17661f45fea39c1dbdaaa1359062
parenta9e6572516bf205000a2dd314385d2c02a9bdb64
[BMalloc] No need to delay deallocating chunks based on recent use
https://bugs.webkit.org/show_bug.cgi?id=196121

Reviewed by Mark Lam.

The "used since last scavenge" logic is not needed for small chunks since their memory isn't decommitted directly.
We can deallocate small chunks immediately as that adds them to the LargeRange free list.  That free list employs the
"used since last scavenge" logic before the scavenger decommits the backing memory.

* bmalloc/Chunk.h:
(bmalloc::Chunk::usedSinceLastScavenge): Deleted.
(bmalloc::Chunk::clearUsedSinceLastScavenge): Deleted.
(bmalloc::Chunk::setUsedSinceLastScavenge): Deleted.
* bmalloc/Heap.cpp:
(bmalloc::Heap::scavenge):
(bmalloc::Heap::allocateSmallPage):

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