feat: Change processMemoryCounters struct uint declaration to uintptr

Signed-off-by: cobolbaby <cobolbaby@qq.com>
This commit is contained in:
cobolbaby 2020-04-13 10:43:29 +08:00
parent 0bb7f92c09
commit c6babafd27
1 changed files with 14 additions and 10 deletions

View File

@ -33,18 +33,22 @@ var (
) )
type processMemoryCounters struct { type processMemoryCounters struct {
// https://docs.microsoft.com/en-us/windows/desktop/api/psapi/ns-psapi-_process_memory_counters_ex // System interface description
// https://docs.microsoft.com/en-us/windows/desktop/api/psapi/ns-psapi-process_memory_counters_ex
// Refer to the Golang internal implementation
// https://golang.org/src/internal/syscall/windows/psapi_windows.go
_ uint32 _ uint32
PageFaultCount uint32 PageFaultCount uint32
PeakWorkingSetSize uint PeakWorkingSetSize uintptr
WorkingSetSize uint WorkingSetSize uintptr
QuotaPeakPagedPoolUsage uint QuotaPeakPagedPoolUsage uintptr
QuotaPagedPoolUsage uint QuotaPagedPoolUsage uintptr
QuotaPeakNonPagedPoolUsage uint QuotaPeakNonPagedPoolUsage uintptr
QuotaNonPagedPoolUsage uint QuotaNonPagedPoolUsage uintptr
PagefileUsage uint PagefileUsage uintptr
PeakPagefileUsage uint PeakPagefileUsage uintptr
PrivateUsage uint PrivateUsage uintptr
} }
func getProcessMemoryInfo(handle windows.Handle) (processMemoryCounters, error) { func getProcessMemoryInfo(handle windows.Handle) (processMemoryCounters, error) {