Bug 939385 (part 1, attempt 2) - Rename largestContiguousVMBlock as vsizeMaxContiguous. r=froydnj.

--HG--
extra : rebase_source : e5bdf43ab2a228f3ade93e803988f81d4f3a646e
This commit is contained in:
Nicholas Nethercote 2013-11-18 22:24:12 -08:00
parent 34d0b55cdf
commit 1393fae24e
3 changed files with 19 additions and 21 deletions

View File

@ -405,8 +405,8 @@ var MEM_STAT_UNSUPPORTED = 1;
var MEM_STAT_SUPPORTED = 2;
TestRunner._hasMemoryStatistics = {}
TestRunner._hasMemoryStatistics.vsize = MEM_STAT_UNKNOWN;
TestRunner._hasMemoryStatistics.vsizeMaxContiguous = MEM_STAT_UNKNOWN;
TestRunner._hasMemoryStatistics.heapAllocated = MEM_STAT_UNKNOWN;
TestRunner._hasMemoryStatistics.largestContiguousVMBlock = MEM_STAT_UNKNOWN;
/**
* This stub is called by SimpleTest when a test is finished.

View File

@ -185,7 +185,7 @@ interface nsIFinishReportingCallback : nsISupports
void callback(in nsISupports data);
};
[scriptable, builtinclass, uuid(2596fa26-495a-4827-a5f5-e34e7f4dd7b5)]
[scriptable, builtinclass, uuid(41c667f4-16b3-424f-95d9-a6f903f72eb2)]
interface nsIMemoryReporterManager : nsISupports
{
/*
@ -263,6 +263,9 @@ interface nsIMemoryReporterManager : nsISupports
* |vsize| (UNITS_BYTES) The virtual size, i.e. the amount of address space
* taken up.
*
* |vsizeMaxContiguous| (UNITS_BYTES) The size of the largest contiguous
* block of virtual memory.
*
* |resident| (UNITS_BYTES) The resident size (a.k.a. RSS or physical memory
* used).
*
@ -300,13 +303,10 @@ interface nsIMemoryReporterManager : nsISupports
*
* |pageFaultsHard| (UNITS_COUNT_CUMULATIVE) The number of hard (a.k.a.
* major) page faults that have occurred since the process started.
*
* |largestContiguousVMBlock| (UNITS_BYTES) The size of the largest
* contiguous block of virtual memory. Only available on Windows; on all
* other platforms, reading this value returns 0.
*/
readonly attribute int64_t explicit;
readonly attribute int64_t vsize;
readonly attribute int64_t vsizeMaxContiguous;
readonly attribute int64_t resident;
readonly attribute int64_t residentFast;
@ -329,8 +329,6 @@ interface nsIMemoryReporterManager : nsISupports
readonly attribute int64_t pageFaultsHard;
readonly attribute int64_t largestContiguousVMBlock;
/*
* This attribute indicates if moz_malloc_usable_size() works.
*/

View File

@ -372,8 +372,8 @@ static nsresult GetResidentFast(int64_t* aN)
return GetResident(aN);
}
#define HAVE_LARGEST_CONTIGUOUS_BLOCK_REPORTERS 1
static nsresult LargestContiguousVMBlock(int64_t* aN)
#define HAVE_VSIZE_MAX_CONTIGUOUS_REPORTER 1
static nsresult GetVsizeMaxContiguous(int64_t* aN)
{
SIZE_T biggestRegion = 0;
MEMORY_BASIC_INFORMATION vmemInfo = {0};
@ -1288,6 +1288,17 @@ nsMemoryReporterManager::GetVsize(int64_t* aVsize)
#endif
}
NS_IMETHODIMP
nsMemoryReporterManager::GetVsizeMaxContiguous(int64_t* aAmount)
{
#ifdef HAVE_VSIZE_MAX_CONTIGUOUS_REPORTER
return ::GetVsizeMaxContiguous(aAmount);
#else
*aAmount = 0;
return NS_ERROR_NOT_AVAILABLE;
#endif
}
NS_IMETHODIMP
nsMemoryReporterManager::GetResident(int64_t* aAmount)
{
@ -1414,17 +1425,6 @@ nsMemoryReporterManager::GetPageFaultsHard(int64_t* aAmount)
#endif
}
NS_IMETHODIMP
nsMemoryReporterManager::GetLargestContiguousVMBlock(int64_t* aAmount)
{
#ifdef HAVE_LARGEST_CONTIGUOUS_BLOCK_REPORTERS
return LargestContiguousVMBlock(aAmount);
#else
*aAmount = 0;
return NS_ERROR_NOT_AVAILABLE;
#endif
}
NS_IMETHODIMP
nsMemoryReporterManager::GetHasMozMallocUsableSize(bool* aHas)
{