memory.go 757 B

123456789101112131415161718192021222324252627
  1. package winapi
  2. // VOID RtlMoveMemory(
  3. // _Out_ VOID UNALIGNED *Destination,
  4. // _In_ const VOID UNALIGNED *Source,
  5. // _In_ SIZE_T Length
  6. // );
  7. //sys RtlMoveMemory(destination *byte, source *byte, length uintptr) (err error) = kernel32.RtlMoveMemory
  8. //sys LocalAlloc(flags uint32, size int) (ptr uintptr) = kernel32.LocalAlloc
  9. //sys LocalFree(ptr uintptr) = kernel32.LocalFree
  10. // BOOL QueryWorkingSet(
  11. // HANDLE hProcess,
  12. // PVOID pv,
  13. // DWORD cb
  14. // );
  15. //sys QueryWorkingSet(handle windows.Handle, pv uintptr, cb uint32) (err error) = psapi.QueryWorkingSet
  16. type PSAPI_WORKING_SET_INFORMATION struct {
  17. NumberOfEntries uintptr
  18. WorkingSetInfo [1]PSAPI_WORKING_SET_BLOCK
  19. }
  20. type PSAPI_WORKING_SET_BLOCK struct {
  21. Flags uintptr
  22. }