mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-28 07:18:30 +00:00
Fix rusage memory reporting on NT
This issue was caused by c23b6ecc3
a few days ago, where we started
polling that information for the first time.
This commit is contained in:
parent
27bc49034c
commit
1ff1854107
4 changed files with 111 additions and 44 deletions
|
@ -108,7 +108,7 @@ textwindows int sys_wait4_nt(int pid, int *opt_out_wstatus, int options,
|
|||
if (opt_out_rusage) {
|
||||
bzero(opt_out_rusage, sizeof(*opt_out_rusage));
|
||||
if (GetProcessMemoryInfo(handles[i], &memcount, sizeof(memcount))) {
|
||||
opt_out_rusage->ru_maxrss = memcount.PeakWorkingSetSize;
|
||||
opt_out_rusage->ru_maxrss = memcount.PeakWorkingSetSize / 1024;
|
||||
opt_out_rusage->ru_majflt = memcount.PageFaultCount;
|
||||
} else {
|
||||
STRACE("%s failed %u", "GetProcessMemoryInfo", GetLastError());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue