fix: process_resident_memory_bytes detected is incorrect in Win7 32bit

Ref: https://github.com/prometheus/client_golang/issues/728
Signed-off-by: Cobolbaby <Zhang.Xing-Long@inventec.com>
This commit is contained in:
cobolbaby 2020-04-10 16:28:01 +08:00 committed by Cobolbaby
parent 70a94c09a1
commit 0bb7f92c09
1 changed files with 9 additions and 9 deletions

View File

@ -36,15 +36,15 @@ type processMemoryCounters struct {
// https://docs.microsoft.com/en-us/windows/desktop/api/psapi/ns-psapi-_process_memory_counters_ex // https://docs.microsoft.com/en-us/windows/desktop/api/psapi/ns-psapi-_process_memory_counters_ex
_ uint32 _ uint32
PageFaultCount uint32 PageFaultCount uint32
PeakWorkingSetSize uint64 PeakWorkingSetSize uint
WorkingSetSize uint64 WorkingSetSize uint
QuotaPeakPagedPoolUsage uint64 QuotaPeakPagedPoolUsage uint
QuotaPagedPoolUsage uint64 QuotaPagedPoolUsage uint
QuotaPeakNonPagedPoolUsage uint64 QuotaPeakNonPagedPoolUsage uint
QuotaNonPagedPoolUsage uint64 QuotaNonPagedPoolUsage uint
PagefileUsage uint64 PagefileUsage uint
PeakPagefileUsage uint64 PeakPagefileUsage uint
PrivateUsage uint64 PrivateUsage uint
} }
func getProcessMemoryInfo(handle windows.Handle) (processMemoryCounters, error) { func getProcessMemoryInfo(handle windows.Handle) (processMemoryCounters, error) {