Git fork

Merge branch 'bs/total-ram-bsd'

Update total_ram() functrion on BSD variants.

* bs/total-ram-bsd:
builtin/gc: correct physical memory detection for OpenBSD / NetBSD

+3 -1
+3 -1
builtin/gc.c
··· 516 total *= (uint64_t)si.mem_unit; 517 return total; 518 } 519 - #elif defined(HAVE_BSD_SYSCTL) && (defined(HW_MEMSIZE) || defined(HW_PHYSMEM)) 520 int64_t physical_memory; 521 int mib[2]; 522 size_t length; ··· 524 mib[0] = CTL_HW; 525 # if defined(HW_MEMSIZE) 526 mib[1] = HW_MEMSIZE; 527 # else 528 mib[1] = HW_PHYSMEM; 529 # endif
··· 516 total *= (uint64_t)si.mem_unit; 517 return total; 518 } 519 + #elif defined(HAVE_BSD_SYSCTL) && (defined(HW_MEMSIZE) || defined(HW_PHYSMEM) || defined(HW_PHYSMEM64)) 520 int64_t physical_memory; 521 int mib[2]; 522 size_t length; ··· 524 mib[0] = CTL_HW; 525 # if defined(HW_MEMSIZE) 526 mib[1] = HW_MEMSIZE; 527 + # elif defined(HW_PHYSMEM64) 528 + mib[1] = HW_PHYSMEM64; 529 # else 530 mib[1] = HW_PHYSMEM; 531 # endif