http://bugs.winehq.org/show_bug.cgi?id=35563
Bug ID: 35563 Summary: GetProcessMemoryInfo() is unimplemented Product: Wine Version: 1.7.12 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: ntdll Assignee: wine-bugs@winehq.org Reporter: achurch+wine@achurch.org Classification: Unclassified
Despite bug 13302, GetProcessMemoryInfo() is still effectively unimplemented, in that it returns zero in all fields instead of actual data. The missing code is in the underlying ntdll call, NtQueryInformationProcess(ProcessVmCounters): (see http://source.winehq.org/source/dlls/ntdll/process.c#L231)
case ProcessVmCounters: { VM_COUNTERS pvmi; [...] /* FIXME : real data */ memset(&pvmi, 0 , sizeof(VM_COUNTERS));
Test program (compile with -lpsapi):
#include <assert.h> #include <windows.h> #include <psapi.h> int main(int argc, char **argv) { PROCESS_MEMORY_COUNTERS pmc; assert(GetProcessMemoryInfo(GetCurrentProcess(), &pmc, sizeof(pmc))); assert(pmc.WorkingSetSize > 0); return 0; }