Skip to content

Commit 9274d89

Browse files
windows: fix windows.QueryWorkingSetEx
1 parent 751c3c6 commit 9274d89

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

windows/syscall_windows.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1782,7 +1782,7 @@ func LoadResourceData(module, resInfo Handle) (data []byte, err error) {
17821782
}
17831783

17841784
// PSAPI_WORKING_SET_EX_BLOCK contains extended working set information for a page.
1785-
type PSAPI_WORKING_SET_EX_BLOCK uint64
1785+
type PSAPI_WORKING_SET_EX_BLOCK uintptr
17861786

17871787
// Valid returns the validity of this page.
17881788
// If this bit is 1, the subsequent members are valid; otherwise they should be ignored.
@@ -1844,7 +1844,7 @@ func (b PSAPI_WORKING_SET_EX_BLOCK) intField(start, length int) uint64 {
18441844
// PSAPI_WORKING_SET_EX_INFORMATION contains extended working set information for a process.
18451845
type PSAPI_WORKING_SET_EX_INFORMATION struct {
18461846
// The virtual address.
1847-
VirtualAddress Pointer
1847+
VirtualAddress uintptr
18481848
// A PSAPI_WORKING_SET_EX_BLOCK union that indicates the attributes of the page at VirtualAddress.
18491849
VirtualAttributes PSAPI_WORKING_SET_EX_BLOCK
18501850
}

windows/syscall_windows_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1026,7 +1026,7 @@ func TestQueryWorkingSetEx(t *testing.T) {
10261026

10271027
process := windows.CurrentProcess()
10281028
information := windows.PSAPI_WORKING_SET_EX_INFORMATION{
1029-
VirtualAddress: windows.Pointer(unsafe.Pointer(&a)),
1029+
VirtualAddress: uintptr(unsafe.Pointer(&a)),
10301030
}
10311031
infos := []windows.PSAPI_WORKING_SET_EX_INFORMATION{information}
10321032

0 commit comments

Comments
 (0)