Title: [230515] trunk/Source/bmalloc
- Revision
- 230515
- Author
- sbar...@apple.com
- Date
- 2018-04-10 21:57:43 -0700 (Tue, 10 Apr 2018)
Log Message
IsoHeapImpl::scavenge* needs to grab the lock
https://bugs.webkit.org/show_bug.cgi?id=184461
Reviewed by Filip Pizlo.
Another thread could be modifying the linked list that the scavenge* methods traverse.
* bmalloc/IsoHeapImplInlines.h:
(bmalloc::IsoHeapImpl<Config>::scavenge):
(bmalloc::IsoHeapImpl<Config>::scavengeToHighWatermark):
Modified Paths
Diff
Modified: trunk/Source/bmalloc/ChangeLog (230514 => 230515)
--- trunk/Source/bmalloc/ChangeLog 2018-04-11 04:16:56 UTC (rev 230514)
+++ trunk/Source/bmalloc/ChangeLog 2018-04-11 04:57:43 UTC (rev 230515)
@@ -1,5 +1,18 @@
2018-04-10 Saam Barati <sbar...@apple.com>
+ IsoHeapImpl::scavenge* needs to grab the lock
+ https://bugs.webkit.org/show_bug.cgi?id=184461
+
+ Reviewed by Filip Pizlo.
+
+ Another thread could be modifying the linked list that the scavenge* methods traverse.
+
+ * bmalloc/IsoHeapImplInlines.h:
+ (bmalloc::IsoHeapImpl<Config>::scavenge):
+ (bmalloc::IsoHeapImpl<Config>::scavengeToHighWatermark):
+
+2018-04-10 Saam Barati <sbar...@apple.com>
+
bmalloc should do partial scavenges more frequently
https://bugs.webkit.org/show_bug.cgi?id=184176
Modified: trunk/Source/bmalloc/bmalloc/IsoHeapImplInlines.h (230514 => 230515)
--- trunk/Source/bmalloc/bmalloc/IsoHeapImplInlines.h 2018-04-11 04:16:56 UTC (rev 230514)
+++ trunk/Source/bmalloc/bmalloc/IsoHeapImplInlines.h 2018-04-11 04:57:43 UTC (rev 230515)
@@ -101,6 +101,7 @@
template<typename Config>
void IsoHeapImpl<Config>::scavenge(Vector<DeferredDecommit>& decommits)
{
+ std::lock_guard<Mutex> locker(this->lock);
forEachDirectory(
[&] (auto& directory) {
directory.scavenge(decommits);
@@ -111,6 +112,7 @@
template<typename Config>
void IsoHeapImpl<Config>::scavengeToHighWatermark(Vector<DeferredDecommit>& decommits)
{
+ std::lock_guard<Mutex> locker(this->lock);
if (!m_directoryHighWatermark)
m_inlineDirectory.scavengeToHighWatermark(decommits);
for (IsoDirectoryPage<Config>* page = m_headDirectory; page; page = page->next) {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes