Title: [241580] trunk/Source/bmalloc
Revision
241580
Author
[email protected]
Date
2019-02-15 00:43:07 -0800 (Fri, 15 Feb 2019)

Log Message

[bmalloc] Do not start scavenger thread if we use system malloc
https://bugs.webkit.org/show_bug.cgi?id=194674

Reviewed by Mark Lam.

We always start the scavenger thread even if system malloc is used by the environment variable like "Malloc=1".
Because bmalloc allocation goes to the system malloc if "Malloc=1" is set, we do not need to scavenge. This patch
changes it not to start the scavenger thread.

* bmalloc/Scavenger.cpp:
(bmalloc::Scavenger::Scavenger):

Modified Paths

Diff

Modified: trunk/Source/bmalloc/ChangeLog (241579 => 241580)


--- trunk/Source/bmalloc/ChangeLog	2019-02-15 08:26:17 UTC (rev 241579)
+++ trunk/Source/bmalloc/ChangeLog	2019-02-15 08:43:07 UTC (rev 241580)
@@ -1,3 +1,17 @@
+2019-02-15  Yusuke Suzuki  <[email protected]>
+
+        [bmalloc] Do not start scavenger thread if we use system malloc
+        https://bugs.webkit.org/show_bug.cgi?id=194674
+
+        Reviewed by Mark Lam.
+
+        We always start the scavenger thread even if system malloc is used by the environment variable like "Malloc=1".
+        Because bmalloc allocation goes to the system malloc if "Malloc=1" is set, we do not need to scavenge. This patch
+        changes it not to start the scavenger thread.
+
+        * bmalloc/Scavenger.cpp:
+        (bmalloc::Scavenger::Scavenger):
+
 2019-02-12  Commit Queue  <[email protected]>
 
         Unreviewed, rolling out r241182.

Modified: trunk/Source/bmalloc/bmalloc/Scavenger.cpp (241579 => 241580)


--- trunk/Source/bmalloc/bmalloc/Scavenger.cpp	2019-02-15 08:26:17 UTC (rev 241579)
+++ trunk/Source/bmalloc/bmalloc/Scavenger.cpp	2019-02-15 08:43:07 UTC (rev 241580)
@@ -67,6 +67,9 @@
 
 Scavenger::Scavenger(std::lock_guard<Mutex>&)
 {
+    if (PerProcess<Environment>::get()->isDebugHeapEnabled())
+        return;
+
 #if BOS(DARWIN)
     auto queue = dispatch_queue_create("WebKit Malloc Memory Pressure Handler", DISPATCH_QUEUE_SERIAL);
     m_pressureHandlerDispatchSource = dispatch_source_create(DISPATCH_SOURCE_TYPE_MEMORYPRESSURE, 0, DISPATCH_MEMORYPRESSURE_CRITICAL, queue);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to