Commit c56a79ad authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

Some borken memory monitoring programs divide by dwTotalPageFile,

which probably isn't zero on windows.
parent c7a3fec5
......@@ -1576,6 +1576,13 @@ VOID WINAPI GlobalMemoryStatus(
/* FIXME: we should track down all the already allocated VM pages and substract them, for now arbitrarily remove 64KB so that it matches NT */
lpmem->dwAvailVirtual = lpmem->dwTotalVirtual-64*1024;
memcpy(&cached_memstatus,lpmem,sizeof(MEMORYSTATUS));
/* it appears some memory display programs want to divide by these values */
if(lpmem->dwTotalPageFile==0)
lpmem->dwTotalPageFile++;
if(lpmem->dwAvailPageFile==0)
lpmem->dwAvailPageFile++;
}
/***********************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment