Bug 847248 (part 2) - Use a smaller chunk size in TimerEventAllocator. r=bz.
authorNicholas Nethercote <nnethercote@mozilla.com>
Sun, 03 Mar 2013 18:50:06 -0800
changeset 124064 f3ad021e88f083fdb851596679103153c5df648e
parent 124063 47ada7ee45de0c570172e76b51dd446b5ce11eaf
child 124065 945e901d852ac98cfb93b046e597651e913ac29b
push id24406
push userryanvm@gmail.com
push dateThu, 07 Mar 2013 17:19:02 +0000
treeherdermozilla-central@71395a927025 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs847248
milestone22.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 847248 (part 2) - Use a smaller chunk size in TimerEventAllocator. r=bz.
xpcom/threads/nsTimerImpl.cpp
--- a/xpcom/threads/nsTimerImpl.cpp
+++ b/xpcom/threads/nsTimerImpl.cpp
@@ -546,17 +546,17 @@ void nsTimerImpl::Fire()
   }
 }
 
 void nsTimerEvent::Init()
 {
   sAllocator = new TimerEventAllocator();
   static const size_t kBucketSizes[] = {sizeof(nsTimerEvent)};
   static const int32_t kNumBuckets = mozilla::ArrayLength(kBucketSizes);
-  static const int32_t kInitialPoolSize = 1024 * sizeof(nsTimerEvent);
+  static const int32_t kInitialPoolSize = 4096;
   sAllocator->Init("TimerEventPool", kBucketSizes, kNumBuckets, kInitialPoolSize);
 }
 
 void nsTimerEvent::Shutdown()
 {
   sCanDeleteAllocator = true;
   DeleteAllocatorIfNeeded();
 }