bmalloc: eager scavenge leaves behind a bogus allocator
authorggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Sep 2014 19:05:38 +0000 (19:05 +0000)
committerggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Sep 2014 19:05:38 +0000 (19:05 +0000)
commit91403fb26977dc07ddf7adfaa7c6516ab66781c6
tree668f213cc251afc3325865d0f9f63863bd391b7f
parentdbd3bf39f1635f2a511f87ce050a2efaf259d926
bmalloc: eager scavenge leaves behind a bogus allocator
https://bugs.webkit.org/show_bug.cgi?id=136743

Reviewed by Sam Weinig.

Be sure to clear the allocator after logging it in the eager scavenge
case, so that we don't later try to allocate out of the lines that we
have thrown away.

We didn't need to do this previously because scavenge would only happen
at thread exit time, after which no further allocation from the per-thread
cache would take place.

* bmalloc/Allocator.cpp:
(bmalloc::Allocator::scavenge):
* bmalloc/MediumAllocator.h:
(bmalloc::MediumAllocator::clear):
* bmalloc/SmallAllocator.h:
(bmalloc::SmallAllocator::clear):

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