Skip to content

Commit

Permalink
64-bit windows api is not available in mingw
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@16914 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
lochel committed Aug 26, 2013
1 parent 6d92f1f commit d54a8f0
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions Compiler/runtime/getMemorySize.c
Expand Up @@ -29,22 +29,14 @@
*/
static size_t getMemorySizeBytes( )
{
#if defined(_WIN32) && (defined(__CYGWIN__) || defined(__CYGWIN32__))
#if (defined(_WIN32) && (defined(__CYGWIN__) || defined(__CYGWIN32__))) || defined(_WIN32)
/* Cygwin under Windows. ------------------------------------ */
/* New 64-bit MEMORYSTATUSEX isn't available. Use old 32.bit */
MEMORYSTATUS status;
status.dwLength = sizeof(status);
GlobalMemoryStatus( &status );
return (size_t)status.dwTotalPhys;

#elif defined(_WIN32)
/* Windows. ------------------------------------------------- */
/* Use new 64-bit MEMORYSTATUSEX, not old 32-bit MEMORYSTATUS */
MEMORYSTATUSEX status;
status.dwLength = sizeof(status);
GlobalMemoryStatusEx( &status );
return (size_t)status.ullTotalPhys;

#elif defined(__unix__) || defined(__unix) || defined(unix) || (defined(__APPLE__) && defined(__MACH__))
/* UNIX variants. ------------------------------------------- */
/* Prefer sysctl() over sysconf() except sysctl() HW_REALMEM and HW_PHYSMEM */
Expand Down

0 comments on commit d54a8f0

Please sign in to comment.