Index: Source/platform/heap/Heap.cpp |
diff --git a/Source/platform/heap/Heap.cpp b/Source/platform/heap/Heap.cpp |
index fb73381446f1fa96c9e0ffac812c603b15e9e05c..fe91e41e8de11f975323192664639643827fc205 100644 |
--- a/Source/platform/heap/Heap.cpp |
+++ b/Source/platform/heap/Heap.cpp |
@@ -2141,11 +2141,10 @@ void Heap::init() |
s_orphanedPagePool = new OrphanedPagePool(); |
s_markingThreads = new Vector<OwnPtr<blink::WebThread> >(); |
if (blink::Platform::current()) { |
- // FIXME: We should let the amount of threads scale with the |
- // amount of processors in the system instead of hardcoding |
- // it. |
+ int processors = blink::Platform::current()->numberOfProcessors(); |
+ int numberOfMarkingThreads = std::min(processors, maxNumberOfMarkingThreads); |
for (int i = 0; i < numberOfMarkingThreads; i++) |
- s_markingThreads->append(adoptPtr(blink::Platform::current()->createThread("Blink Heap Marker Thread"))); |
+ s_markingThreads->append(adoptPtr(blink::Platform::current()->createThread("Blink GC Marking Thread"))); |
} |
} |