src/cpuinfo/SDL_cpuinfo.c
changeset 7826 a87057441d01
parent 7823 4ab3a5ee041d
child 7828 1451063c8ecd
     1.1 --- a/src/cpuinfo/SDL_cpuinfo.c	Thu Oct 17 17:38:55 2013 -0700
     1.2 +++ b/src/cpuinfo/SDL_cpuinfo.c	Thu Oct 17 20:49:30 2013 -0700
     1.3 @@ -620,7 +620,16 @@
     1.4  #endif
     1.5  #ifdef HAVE_SYSCTLBYNAME
     1.6          if (SDL_SystemRAM <= 0) {
     1.7 +#ifdef __FreeBSD__
     1.8 +#ifdef HW_REALMEM
     1.9 +            int mib[2] = {CTL_HW, HW_REALMEM};
    1.10 +#else
    1.11 +            /* might only report up to 2 GiB */
    1.12 +            int mib[2] = {CTL_HW, HW_PHYSMEM};
    1.13 +#endif /* HW_REALMEM */
    1.14 +#else
    1.15              int mib[2] = {CTL_HW, HW_MEMSIZE};
    1.16 +#endif /* __FreeBSD__ */
    1.17              Uint64 memsize = 0;
    1.18              size_t len = sizeof(memsize);
    1.19