]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/utilsunx.cpp
reformat for readability; more prep. for patch 1376506
[wxWidgets.git] / src / unix / utilsunx.cpp
index e8e31e528679bd05a8845ee14cafd845e1ce85b1..54354d378dcfe5956af701a9f0e4757c94cbf08d 100644 (file)
     #include <sys/utsname.h> // for uname()
 #endif // HAVE_UNAME
 
+// Used by wxGetFreeMemory().
+#ifdef __SGI__
+    #include <sys/sysmp.h>
+    #include <sys/sysinfo.h>   // for SAGET and MINFO structures
+#endif
+
 // ----------------------------------------------------------------------------
 // conditional compilation
 // ----------------------------------------------------------------------------
@@ -910,6 +916,10 @@ wxMemorySize wxGetFreeMemory()
     }
 #elif defined(__SUN__) && defined(_SC_AVPHYS_PAGES)
     return (wxMemorySize)(sysconf(_SC_AVPHYS_PAGES)*sysconf(_SC_PAGESIZE));
+#elif defined(__SGI__)
+    struct rminfo realmem;
+    if ( sysmp(MP_SAGET, MPSA_RMINFO, &realmem, sizeof realmem) == 0 )
+        return ((wxMemorySize)realmem.physmem * sysconf(_SC_PAGESIZE));
 //#elif defined(__FREEBSD__) -- might use sysctl() to find it out, probably
 #endif