src/os/bsd/vm/os_bsd.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/src/os/bsd/vm/os_bsd.cpp	Fri Jan 18 15:03:49 2013
--- new/src/os/bsd/vm/os_bsd.cpp	Fri Jan 18 15:03:49 2013

*** 241,251 **** --- 241,251 ---- void os::Bsd::initialize_system_info() { int mib[2]; size_t len; int cpu_val; ! u_long mem_val; ! julong mem_val; /* get processors count via hw.ncpus sysctl */ mib[0] = CTL_HW; mib[1] = HW_NCPU; len = sizeof(cpu_val);
*** 254,268 **** --- 254,268 ---- } else { set_processor_count(1); // fallback } ! /* get physical memory via hw.usermem sysctl (hw.usermem is used * instead of hw.physmem because we need size of allocatable memory ! /* get physical memory via hw.memsize sysctl (hw.memsize is used + * since it returns a 64 bit value) */ mib[0] = CTL_HW; ! mib[1] = HW_USERMEM; ! mib[1] = HW_MEMSIZE; len = sizeof(mem_val); if (sysctl(mib, 2, &mem_val, &len, NULL, 0) != -1) _physical_memory = mem_val; else _physical_memory = 256*1024*1024; // fallback (XXXBSD?)

src/os/bsd/vm/os_bsd.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File