Mesa (master): Teach os_get_total_physical_memory about Cygwin

Jon TURNEY jturney at kemper.freedesktop.org
Wed Aug 20 16:19:27 UTC 2014


Module: Mesa
Branch: master
Commit: bde2a62af72847f6722180d0203f5b537d1df8ab
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=bde2a62af72847f6722180d0203f5b537d1df8ab

Author: Jon TURNEY <jon.turney at dronecode.org.uk>
Date:   Sun Aug 17 17:21:27 2014 +0100

Teach os_get_total_physical_memory about Cygwin

Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
Reviewed-by: Emil Velikov <emil.l.velikov at gmail.com>

---

 src/gallium/auxiliary/os/os_misc.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/auxiliary/os/os_misc.c b/src/gallium/auxiliary/os/os_misc.c
index 3846a9a..ef84c79 100644
--- a/src/gallium/auxiliary/os/os_misc.c
+++ b/src/gallium/auxiliary/os/os_misc.c
@@ -47,7 +47,7 @@
 #endif
 
 
-#if defined(PIPE_OS_LINUX)
+#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_CYGWIN)
 #  include <unistd.h>
 #elif defined(PIPE_OS_APPLE) || defined(PIPE_OS_BSD)
 #  include <sys/sysctl.h>
@@ -111,7 +111,7 @@ os_get_option(const char *name)
 bool
 os_get_total_physical_memory(uint64_t *size)
 {
-#if defined(PIPE_OS_LINUX)
+#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_CYGWIN)
    const long phys_pages = sysconf(_SC_PHYS_PAGES);
    const long page_size = sysconf(_SC_PAGE_SIZE);
 




More information about the mesa-commit mailing list