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
_ uint32
PageFaultCount uint32
PeakWorkingSetSize uint64
WorkingSetSize uint64
QuotaPeakPagedPoolUsage uint64
QuotaPagedPoolUsage uint64
QuotaPeakNonPagedPoolUsage uint64
QuotaNonPagedPoolUsage uint64
PagefileUsage uint64
PeakPagefileUsage uint64
PrivateUsage uint64
PeakWorkingSetSize uint
WorkingSetSize uint
QuotaPeakPagedPoolUsage uint
QuotaPagedPoolUsage uint
QuotaPeakNonPagedPoolUsage uint
QuotaNonPagedPoolUsage uint
PagefileUsage uint
PeakPagefileUsage uint
PrivateUsage uint
}
func getProcessMemoryInfo(handle windows.Handle) (processMemoryCounters, error) {