GetFreeSpace is here since 1993 and returns crazy values. Let's have win64/win32 cases only.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31154 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1015,15 +1015,13 @@ wxMemorySize wxGetFreeMemory()
|
||||
#if defined(__WIN64__)
|
||||
MEMORYSTATUSEX memStatex;
|
||||
statex.dwLength = sizeof (statex);
|
||||
GlobalMemoryStatusEx (&statex);
|
||||
::GlobalMemoryStatusEx (&statex);
|
||||
return (wxMemorySize)memStatus.ullAvailPhys;
|
||||
#elif defined(__WIN32__) && !defined(__BORLANDC__)
|
||||
#else /* if defined(__WIN32__) */
|
||||
MEMORYSTATUS memStatus;
|
||||
memStatus.dwLength = sizeof(MEMORYSTATUS);
|
||||
GlobalMemoryStatus(&memStatus);
|
||||
::GlobalMemoryStatus(&memStatus);
|
||||
return (wxMemorySize)memStatus.dwAvailPhys;
|
||||
#else
|
||||
return (wxMemorySize)GetFreeSpace(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user