src/cpuinfo/SDL_cpuinfo.c
changeset 7823 4ab3a5ee041d
parent 7822 6bd98963606b
child 7826 a87057441d01
equal deleted inserted replaced
7822:6bd98963606b 7823:4ab3a5ee041d
   619         }
   619         }
   620 #endif
   620 #endif
   621 #ifdef HAVE_SYSCTLBYNAME
   621 #ifdef HAVE_SYSCTLBYNAME
   622         if (SDL_SystemRAM <= 0) {
   622         if (SDL_SystemRAM <= 0) {
   623             int mib[2] = {CTL_HW, HW_MEMSIZE};
   623             int mib[2] = {CTL_HW, HW_MEMSIZE};
   624             uint64 memsize = 0;
   624             Uint64 memsize = 0;
   625             size_t len = sizeof(memsize);
   625             size_t len = sizeof(memsize);
   626             
   626             
   627             if (sysctl(mib, 2, &memsize, &len, NULL, 0) == 0) {
   627             if (sysctl(mib, 2, &memsize, &len, NULL, 0) == 0) {
   628                 SDL_SystemRAM = (int)(memsize / (1024*1024));
   628                 SDL_SystemRAM = (int)(memsize / (1024*1024));
   629             }
   629             }