Extend getPhysicalMemorySize to iOS (#8533)
authorAustin Seipp <austin@well-typed.com>
Thu, 21 Nov 2013 22:48:24 +0000 (16:48 -0600)
committerAustin Seipp <austin@well-typed.com>
Fri, 22 Nov 2013 14:04:53 +0000 (08:04 -0600)
Authored-by: Authored-by: Luke Iannini <lukexi@me.com>
Signed-off-by: Austin Seipp <austin@well-typed.com>
rts/posix/OSMem.c

index acdb00e..b57adbf 100644 (file)
@@ -269,7 +269,7 @@ StgWord64 getPhysicalMemorySize (void)
 {
     static StgWord64 physMemSize = 0;
     if (!physMemSize) {
-#ifdef darwin_HOST_OS
+#if defined(darwin_HOST_OS) || defined(ios_HOST_OS)
         /* So, darwin doesn't support _SC_PHYS_PAGES, but it does
            support getting the raw memory size in bytes through
            sysctlbyname(hw.memsize); */