[commit: ghc] master: Extend getPhysicalMemorySize to iOS (#8533) (bb73d1d)

git at git.haskell.org git at git.haskell.org
Fri Nov 22 14:22:40 UTC 2013


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/bb73d1d4a4e5195cbecc5a009a0e798af02aa37b/ghc

>---------------------------------------------------------------

commit bb73d1d4a4e5195cbecc5a009a0e798af02aa37b
Author: Austin Seipp <austin at well-typed.com>
Date:   Thu Nov 21 16:48:24 2013 -0600

    Extend getPhysicalMemorySize to iOS (#8533)
    
    Authored-by: Authored-by: Luke Iannini <lukexi at me.com>
    Signed-off-by: Austin Seipp <austin at well-typed.com>


>---------------------------------------------------------------

bb73d1d4a4e5195cbecc5a009a0e798af02aa37b
 rts/posix/OSMem.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rts/posix/OSMem.c b/rts/posix/OSMem.c
index acdb00e..b57adbf 100644
--- a/rts/posix/OSMem.c
+++ b/rts/posix/OSMem.c
@@ -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); */



More information about the ghc-commits mailing list