Some borken memory monitoring programs divide by dwTotalPageFile,

which probably isn't zero on windows.
This commit is contained in:
Mike McCormack 2001-01-04 19:52:51 +00:00 committed by Alexandre Julliard
parent c7a3fec5be
commit c56a79ad06
1 changed files with 7 additions and 0 deletions

View File

@ -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++;
}
/***********************************************************************