mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
fixup for older wndows
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27034 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b3207e1550
commit
efd8093546
2 changed files with 14 additions and 0 deletions
|
@ -140,11 +140,18 @@ NSRealMemoryAvailable ()
|
|||
return 0;
|
||||
return info.freeram;
|
||||
#elif defined(__MINGW32__)
|
||||
#if (_WIN32_WINNT >= 0x0500)
|
||||
MEMORYSTATUSEX memory;
|
||||
|
||||
memory.dwLength = sizeof(memory);
|
||||
GlobalMemoryStatusEx(&memory);
|
||||
return memory.ullAvailPhys;
|
||||
#else
|
||||
MEMORYSTATUS memory;
|
||||
|
||||
GlobalMemoryStatus(&memory);
|
||||
return memory.dwAvailPhys;
|
||||
#endif
|
||||
#elif defined(__BEOS__)
|
||||
system_info info;
|
||||
|
||||
|
|
|
@ -1277,11 +1277,18 @@ static void determineOperatingSystem()
|
|||
if (beenHere == NO)
|
||||
{
|
||||
#if defined(__MINGW32__)
|
||||
#if (_WIN32_WINNT >= 0x0500)
|
||||
MEMORYSTATUSEX memory;
|
||||
|
||||
memory.dwLength = sizeof(memory);
|
||||
GlobalMemoryStatusEx(&memory);
|
||||
return memory.ullTotalPhys;
|
||||
#else
|
||||
MEMORYSTATUS memory;
|
||||
|
||||
GlobalMemoryStatus(&memory);
|
||||
return memory.dwTotalPhys;
|
||||
#endif
|
||||
#elif defined(_SC_PHYS_PAGES)
|
||||
availMem = sysconf(_SC_PHYS_PAGES) * NSPageSize();
|
||||
#elif defined(HAVE_PROCFS)
|
||||
|
|
Loading…
Reference in a new issue