Bug 785463 - Tweak PurpleBuffer Block size, r=mccr8
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Fri, 24 Aug 2012 12:26:44 -0700
changeset 103239 45204dc49ac2e75e33170539fe251e48507cefcc
parent 103238 35431a5588e0186b2a176d51927f9962d47e0044
child 103338 62f13ac39e4c9c1fd2a24b0fbc6a83f460c64b1a
push id23342
push useropettay@mozilla.com
push dateFri, 24 Aug 2012 19:28:29 +0000
treeherdermozilla-central@45204dc49ac2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmccr8
bugs785463
milestone17.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 785463 - Tweak PurpleBuffer Block size, r=mccr8
xpcom/base/nsCycleCollector.cpp
--- a/xpcom/base/nsCycleCollector.cpp
+++ b/xpcom/base/nsCycleCollector.cpp
@@ -699,17 +699,18 @@ typedef nsTHashtable<nsPtrHashKey<const 
 static inline void
 ToParticipant(nsISupports *s, nsXPCOMCycleCollectionParticipant **cp);
 
 struct nsPurpleBuffer
 {
 private:
     struct Block {
         Block *mNext;
-        nsPurpleBufferEntry mEntries[255];
+         // Try to match the size of a jemalloc bucket.
+        nsPurpleBufferEntry mEntries[1360];
 
         Block() : mNext(nullptr) {}
     };
 public:
     // This class wraps a linked list of the elements in the purple
     // buffer.
 
     nsCycleCollectorParams &mParams;