Bug 913953 - Part m: Remove unused GetPrivateBytes function; r=ehsan

This commit is contained in:
Ms2ger 2013-09-10 09:03:35 +02:00
parent 1eea33881e
commit 3d093a9b97
2 changed files with 0 additions and 18 deletions

View File

@ -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

View File

@ -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;