소스 검색

Update and fix a couple of comments in meminfo.c

This fixes a typo and also notes that HW_PHYSMEM64 is defined on
NetBSD (not just OpenBSD).

Signed-off-by: Kris Katterjohn <katterjohn@gmail.com>
Kris Katterjohn 5 년 전
부모
커밋
cbcf75d728
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/lib/meminfo/meminfo.c

+ 2 - 2
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);