Ticket #8533: extend_osmem_ifdef_to_ios.patch

File extend_osmem_ifdef_to_ios.patch, 504 bytes (added by lukexi, 22 months ago)
  • rts/posix/OSMem.c

    diff --git a/rts/posix/OSMem.c b/rts/posix/OSMem.c
    index acdb00e..b57adbf 100644
    a b StgWord64 getPhysicalMemorySize (void) 
    269269{
    270270    static StgWord64 physMemSize = 0;
    271271    if (!physMemSize) {
    272 #ifdef darwin_HOST_OS
     272#if defined(darwin_HOST_OS) || defined(ios_HOST_OS)
    273273        /* So, darwin doesn't support _SC_PHYS_PAGES, but it does
    274274           support getting the raw memory size in bytes through
    275275           sysctlbyname(hw.memsize); */