diff --git a/content/base/src/nsNodeInfo.cpp b/content/base/src/nsNodeInfo.cpp index f330b4b6d3d..2ef468f3528 100644 --- a/content/base/src/nsNodeInfo.cpp +++ b/content/base/src/nsNodeInfo.cpp @@ -66,8 +66,7 @@ static const size_t kNodeInfoPoolSizes[] = { sizeof(nsNodeInfo) }; -static const PRInt32 kNodeInfoPoolInitialSize = - (NS_SIZE_IN_HEAP(sizeof(nsNodeInfo))) * 64; +static const PRInt32 kNodeInfoPoolInitialSize = sizeof(nsNodeInfo) * 64; // static nsFixedSizeAllocator* nsNodeInfo::sNodeInfoPool = nsnull; diff --git a/content/events/src/nsEventDispatcher.cpp b/content/events/src/nsEventDispatcher.cpp index 8272aaabc9f..ab612503677 100644 --- a/content/events/src/nsEventDispatcher.cpp +++ b/content/events/src/nsEventDispatcher.cpp @@ -423,7 +423,7 @@ public: static const size_t kBucketSizes[] = { sizeof(nsEventTargetChainItem) }; static const PRInt32 kNumBuckets = sizeof(kBucketSizes) / sizeof(size_t); static const PRInt32 kInitialPoolSize = - NS_SIZE_IN_HEAP(sizeof(nsEventTargetChainItem)) * NS_CHAIN_POOL_SIZE; + sizeof(nsEventTargetChainItem) * NS_CHAIN_POOL_SIZE; nsresult rv = sEtciPool->Init("EventTargetChainItem Pool", kBucketSizes, kNumBuckets, kInitialPoolSize); if (NS_FAILED(rv)) { diff --git a/content/xbl/src/nsXBLPrototypeBinding.cpp b/content/xbl/src/nsXBLPrototypeBinding.cpp index b11d2a2a6a6..72bc76b6200 100644 --- a/content/xbl/src/nsXBLPrototypeBinding.cpp +++ b/content/xbl/src/nsXBLPrototypeBinding.cpp @@ -293,9 +293,9 @@ static const size_t kAttrBucketSizes[] = { }; static const PRInt32 kAttrNumBuckets = sizeof(kAttrBucketSizes)/sizeof(size_t); -static const PRInt32 kAttrInitialSize = (NS_SIZE_IN_HEAP(sizeof(nsXBLAttributeEntry))) * kNumElements; +static const PRInt32 kAttrInitialSize = sizeof(nsXBLAttributeEntry) * kNumElements; -static const PRInt32 kInsInitialSize = (NS_SIZE_IN_HEAP(sizeof(nsXBLInsertionPointEntry))) * kNumElements; +static const PRInt32 kInsInitialSize = sizeof(nsXBLInsertionPointEntry) * kNumElements; // Implementation ///////////////////////////////////////////////////////////////// diff --git a/content/xbl/src/nsXBLService.cpp b/content/xbl/src/nsXBLService.cpp index ebe97a1d80f..9efd33ea448 100644 --- a/content/xbl/src/nsXBLService.cpp +++ b/content/xbl/src/nsXBLService.cpp @@ -227,7 +227,7 @@ static const size_t kBucketSizes[] = { static const PRInt32 kNumBuckets = sizeof(kBucketSizes)/sizeof(size_t); static const PRInt32 kNumElements = 64; -static const PRInt32 kInitialSize = (NS_SIZE_IN_HEAP(sizeof(nsXBLBindingRequest))) * kNumElements; +static const PRInt32 kInitialSize = sizeof(nsXBLBindingRequest) * kNumElements; nsIXBLService* nsXBLBindingRequest::gXBLService = nsnull; int nsXBLBindingRequest::gRefCnt = 0; diff --git a/parser/htmlparser/src/nsDTDUtils.cpp b/parser/htmlparser/src/nsDTDUtils.cpp index 5454e8c36a3..538a3fffc3d 100644 --- a/parser/htmlparser/src/nsDTDUtils.cpp +++ b/parser/htmlparser/src/nsDTDUtils.cpp @@ -794,7 +794,7 @@ void nsDTDContext::ReleaseGlobalObjects(void){ static const size_t kTokenBuckets[] ={sizeof(CStartToken),sizeof(CAttributeToken),sizeof(CCommentToken),sizeof(CEndToken)}; static const PRInt32 kNumTokenBuckets = sizeof(kTokenBuckets) / sizeof(size_t); -static const PRInt32 kInitialTokenPoolSize = NS_SIZE_IN_HEAP(sizeof(CToken)) * 200; +static const PRInt32 kInitialTokenPoolSize = sizeof(CToken) * 200; /** * @@ -955,7 +955,7 @@ nsNodeAllocator::nsNodeAllocator():mSharedNodes(0){ #else static const size_t kNodeBuckets[] = { sizeof(nsCParserNode), sizeof(nsCParserStartNode) }; static const PRInt32 kNumNodeBuckets = sizeof(kNodeBuckets) / sizeof(size_t); - static const PRInt32 kInitialNodePoolSize = NS_SIZE_IN_HEAP(sizeof(nsCParserNode)) * 35; // optimal size based on space-trace data + static const PRInt32 kInitialNodePoolSize = sizeof(nsCParserNode) * 35; // optimal size based on space-trace data nsNodeAllocator::nsNodeAllocator() { mNodePool.Init("NodePool", kNodeBuckets, kNumNodeBuckets, kInitialNodePoolSize); #endif diff --git a/xpcom/ds/nsFixedSizeAllocator.h b/xpcom/ds/nsFixedSizeAllocator.h index 014d5795943..48b54bb39c2 100644 --- a/xpcom/ds/nsFixedSizeAllocator.h +++ b/xpcom/ds/nsFixedSizeAllocator.h @@ -96,8 +96,7 @@ // This is the intial size of the allocator, in bytes. We'll // assume that we want to start with space for 1024 Foo objects. - static const PRInt32 kInitialPoolSize = - NS_SIZE_IN_HEAP(sizeof(Foo)) * 1024; + static const PRInt32 kInitialPoolSize = sizeof(Foo) * 1024; // Initialize (or re-initialize) the pool pool.Init("TheFooPool", kBucketSizes, kNumBuckets, kInitialPoolSize); @@ -132,8 +131,6 @@ #include "nsError.h" #include "plarena.h" -#define NS_SIZE_IN_HEAP(_size) (_size) - class nsFixedSizeAllocator { protected: diff --git a/xpcom/threads/nsTimerImpl.cpp b/xpcom/threads/nsTimerImpl.cpp index 6a5d673e16e..8a451c79973 100644 --- a/xpcom/threads/nsTimerImpl.cpp +++ b/xpcom/threads/nsTimerImpl.cpp @@ -561,7 +561,7 @@ void nsTimerEvent::Init() sAllocator = new TimerEventAllocator(); static const size_t kBucketSizes[] = {sizeof(nsTimerEvent)}; static const PRInt32 kNumBuckets = mozilla::ArrayLength(kBucketSizes); - static const PRInt32 kInitialPoolSize = 1024 * NS_SIZE_IN_HEAP(sizeof(nsTimerEvent)); + static const PRInt32 kInitialPoolSize = 1024 * sizeof(nsTimerEvent); sAllocator->Init("TimerEventPool", kBucketSizes, kNumBuckets, kInitialPoolSize); }