diff options
author | Alexander Færøy <ahf@torproject.org> | 2018-04-03 17:43:17 +0200 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2018-04-12 10:51:45 -0400 |
commit | bd42367a1e6f60d35242d2a5165f10e3a8623bf7 (patch) | |
tree | a0ea2cf4ff7c9309581341bc84ac974a8af70375 /src/common/compat.h | |
parent | 0803d79f55e0554c8f9c479112f3a317a97b4ddf (diff) | |
download | tor-bd42367a1e6f60d35242d2a5165f10e3a8623bf7.tar.gz tor-bd42367a1e6f60d35242d2a5165f10e3a8623bf7.zip |
Make get_total_system_memory mockable.
This patch makes get_total_system_memory mockable, which allows us to
alter the return value of the function in tests.
See: https://bugs.torproject.org/24782
Diffstat (limited to 'src/common/compat.h')
-rw-r--r-- | src/common/compat.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/compat.h b/src/common/compat.h index 93301feda0..3088e68355 100644 --- a/src/common/compat.h +++ b/src/common/compat.h @@ -699,7 +699,7 @@ char *make_path_absolute(char *fname); char **get_environment(void); -int get_total_system_memory(size_t *mem_out); +MOCK_DECL(int, get_total_system_memory, (size_t *mem_out)); int compute_num_cpus(void); |