Bug 1205358 - Fix up nsUrlClassifierPrefixSet memory reporting. r=gcp.
This patch reverts the "measure-in-advance" approach added in part 1 of bug 1050108 -- because that doesn't interact well with DMD -- and adds locking to avoid races between the url-classifier thread and the main thread.
This commit is contained in:
@@ -584,7 +584,7 @@ LookupCache::ConstructPrefixSet(AddPrefixArray& aAddPrefixes)
|
||||
|
||||
#ifdef DEBUG
|
||||
uint32_t size;
|
||||
size = mPrefixSet->SizeInMemory();
|
||||
size = mPrefixSet->SizeOfIncludingThis(moz_malloc_size_of);
|
||||
LOG(("SB tree done, size = %d bytes\n", size));
|
||||
#endif
|
||||
|
||||
@@ -627,7 +627,7 @@ LookupCache::LoadPrefixSet()
|
||||
|
||||
#ifdef DEBUG
|
||||
if (mPrimed) {
|
||||
uint32_t size = mPrefixSet->SizeInMemory();
|
||||
uint32_t size = mPrefixSet->SizeOfIncludingThis(moz_malloc_size_of);
|
||||
LOG(("SB tree done, size = %d bytes\n", size));
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user