mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 913953 - Part m: Remove unused GetPrivateBytes function; r=ehsan
This commit is contained in:
parent
1eea33881e
commit
3d093a9b97
@ -286,10 +286,6 @@ class ProcessMetrics {
|
||||
size_t GetPeakPagefileUsage() const;
|
||||
// Returns the current working set size, in bytes.
|
||||
size_t GetWorkingSetSize() const;
|
||||
// Returns private usage, in bytes. Private bytes is the amount
|
||||
// of memory currently allocated to a process that cannot be shared.
|
||||
// Note: returns 0 on unsupported OSes: prior to XP SP2.
|
||||
size_t GetPrivateBytes() const;
|
||||
|
||||
// Returns the CPU usage in percent since the last time this method was
|
||||
// called. The first time this method is called it returns 0 and will return
|
||||
|
@ -494,20 +494,6 @@ size_t ProcessMetrics::GetWorkingSetSize() const {
|
||||
return 0;
|
||||
}
|
||||
|
||||
size_t ProcessMetrics::GetPrivateBytes() const {
|
||||
// PROCESS_MEMORY_COUNTERS_EX is not supported until XP SP2.
|
||||
// GetProcessMemoryInfo() will simply fail on prior OS. So the requested
|
||||
// information is simply not available. Hence, we will return 0 on unsupported
|
||||
// OSes. Unlike most Win32 API, we don't need to initialize the "cb" member.
|
||||
PROCESS_MEMORY_COUNTERS_EX pmcx;
|
||||
if (GetProcessMemoryInfo(process_,
|
||||
reinterpret_cast<PROCESS_MEMORY_COUNTERS*>(&pmcx),
|
||||
sizeof(pmcx))) {
|
||||
return pmcx.PrivateUsage;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static uint64_t FileTimeToUTC(const FILETIME& ftime) {
|
||||
LARGE_INTEGER li;
|
||||
li.LowPart = ftime.dwLowDateTime;
|
||||
|
Loading…
Reference in New Issue
Block a user