mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 747803 - Remove NS_SIZE_IN_HEAP. r=bz.
This commit is contained in:
parent
42c3843cfa
commit
76a872e30a
@ -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;
|
||||
|
@ -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)) {
|
||||
|
@ -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 /////////////////////////////////////////////////////////////////
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user