aboutsummaryrefslogtreecommitdiff
path: root/src/lib/meminfo/meminfo.c
AgeCommit message (Collapse)Author
2021-03-03Fix parsing bug in linux get_total_system_memory().Nick Mathewson
Use find_str_at_start_of_line(), not strstr() here: we don't want to match "MemTotal: " if it appears in the middle of a line. Fixes #40315; bugfix on 0.2.5.4-alpha.
2021-02-23Remove mallinfo() from codebaseDavid Goulet
Now deprecated in libc >= 2.33 Closes #40309 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-01-09Merge branch 'pre_formatter_cleanups_squashed'Nick Mathewson
2020-01-09Use new ENABLE/DISABLE_GCC_WARNINGNick Mathewson
This is an automated commit, generated by: perl -i -pe 'next if /define/; s/((?:ENABLE|DISABLE)_GCC_WARNING)\(([A-Za-z0-9_\-]+)\)/$1(\"-W$2\")/' src/*/*/*.[ch] src/*/*.[ch]
2020-01-08It's 2020. Update the copyright dates with "make update-copyright"Nick Mathewson
2019-09-30Re-run "make autostyle" with improved annotate_ifdef_directivesNick Mathewson
2019-09-09build: The <sys/sysctl.h> is now deprecated on LinuxDavid Goulet
Closes #31673
2019-01-16Update and fix a couple of comments in meminfo.cKris Katterjohn
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>
2019-01-16Use HW_PHYSMEM instead of HW_USERMEM in get_total_system_memory_implKris Katterjohn
The code checked for sysctl being available and HW_PHYSMEM being defined, but HW_USERMEM was actually being used with sysctl instead of HW_PHYSMEM. The case for OpenBSD, etc. use HW_PHYSMEM64 (which is obviously a 64-bit variant of HW_PHYSMEM) and the case for OSX uses HW_MEMSIZE (which appears to be a 64-bit variant of HW_PHYSMEM). Signed-off-by: Kris Katterjohn <katterjohn@gmail.com>
2019-01-16Bump copyright date to 2019.Nick Mathewson
2018-07-10Rename torlog.[ch] to log.[ch]Nick Mathewson
Fun fact: these files used to be called log.[ch] until we ran into conflicts with systems having a log.h file. But now that we always include "lib/log/log.h", we should be fine.
2018-07-10Rename util_malloc to malloc.Nick Mathewson
2018-07-01File-level documentation for some of src/lib.Nick Mathewson
2018-06-29Move fd and memory-info functions.Nick Mathewson