summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-01-16 14:43:53 -0500
committerNick Mathewson <nickm@torproject.org>2019-01-16 14:43:53 -0500
commit16430fdaf546cf8a2711a4c87380398bd4358d54 (patch)
tree76847ee4f6f0750b8bc357e70cbd358707e2db1e /src
parent2f683465d4b666c5d8f84fb3b234ad539d8511cd (diff)
parentf0408b844ffe2545c33306cb04b03fff8148989f (diff)
downloadtor-16430fdaf546cf8a2711a4c87380398bd4358d54.tar.gz
tor-16430fdaf546cf8a2711a4c87380398bd4358d54.zip
Merge branch 'maint-0.3.5'
Diffstat (limited to 'src')
-rw-r--r--src/lib/meminfo/meminfo.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/meminfo/meminfo.c b/src/lib/meminfo/meminfo.c
index 790d698910..f233188897 100644
--- a/src/lib/meminfo/meminfo.c
+++ b/src/lib/meminfo/meminfo.c
@@ -60,7 +60,7 @@ tor_log_mallinfo(int severity)
ENABLE_GCC_WARNING(aggregate-return)
#if defined(HW_PHYSMEM64)
-/* This appears to be an OpenBSD thing */
+/* OpenBSD and NetBSD define this */
#define INT64_HW_MEM HW_PHYSMEM64
#elif defined(HW_MEMSIZE)
/* OSX defines this one */
@@ -115,7 +115,7 @@ get_total_system_memory_impl(void)
return ms.ullTotalPhys;
#elif defined(HAVE_SYSCTL) && defined(INT64_HW_MEM)
- /* On many systems, HW_PYHSMEM is clipped to 32 bits; let's use a better
+ /* On many systems, HW_PHYSMEM is clipped to 32 bits; let's use a better
* variant if we know about it. */
uint64_t memsize = 0;
size_t len = sizeof(memsize);
@@ -130,7 +130,7 @@ get_total_system_memory_impl(void)
* HW_PHYSMEM. */
size_t memsize=0;
size_t len = sizeof(memsize);
- int mib[2] = {CTL_HW, HW_USERMEM};
+ int mib[2] = {CTL_HW, HW_PHYSMEM};
if (sysctl(mib,2,&memsize,&len,NULL,0))
return 0;