diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-06-03 08:55:23 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-06-03 08:55:24 -0700 |
| commit | d9a1e51c76818858d1bc59d1a2a056a1e1df1c41 (patch) | |
| tree | 9d48fbe9d006ed2612af25cce99118a60e89fa17 /builtin | |
| parent | 86c32bbee8501310290d146a48a1aea22ce9c779 (diff) | |
| parent | 35c1d592cd11429e402501df3ad68bcd0fb86bef (diff) | |
| download | git-d9a1e51c76818858d1bc59d1a2a056a1e1df1c41.tar.gz | |
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
Diffstat (limited to 'builtin')
| -rw-r--r-- | builtin/gc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin/gc.c b/builtin/gc.c index e33ba946e4..7dc94f243d 100644 --- a/builtin/gc.c +++ b/builtin/gc.c @@ -516,7 +516,7 @@ static uint64_t total_ram(void) total *= (uint64_t)si.mem_unit; return total; } -#elif defined(HAVE_BSD_SYSCTL) && (defined(HW_MEMSIZE) || defined(HW_PHYSMEM)) +#elif defined(HAVE_BSD_SYSCTL) && (defined(HW_MEMSIZE) || defined(HW_PHYSMEM) || defined(HW_PHYSMEM64)) int64_t physical_memory; int mib[2]; size_t length; @@ -524,6 +524,8 @@ static uint64_t total_ram(void) mib[0] = CTL_HW; # if defined(HW_MEMSIZE) mib[1] = HW_MEMSIZE; +# elif defined(HW_PHYSMEM64) + mib[1] = HW_PHYSMEM64; # else mib[1] = HW_PHYSMEM; # endif |
