Bug 785463 - Tweak PurpleBuffer Block size, r=mccr8
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Fri, 24 Aug 2012 12:26:44 -0700
changeset 105272 45204dc49ac2e75e33170539fe251e48507cefcc
parent 105271 35431a5588e0186b2a176d51927f9962d47e0044
child 105371 62f13ac39e4c9c1fd2a24b0fbc6a83f460c64b1a
push id55
push usershu@rfrn.org
push dateThu, 30 Aug 2012 01:33:09 +0000
reviewersmccr8
bugs785463
milestone17.0a1
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;