diff options
author | antirez <antirez@gmail.com> | 2012-11-21 13:17:38 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2012-11-21 13:17:38 +0100 |
commit | 3cb432837ce799062c83337e5f590c385e48d4bd (patch) | |
tree | 72fe5c9064af2a07c9318cc24aaeb51bf3a62673 | |
parent | 49b645235100fc214468b608c1ba6cdbc320fa88 (diff) | |
download | redis-3cb432837ce799062c83337e5f590c385e48d4bd.tar.gz |
Use more fine grained HAVE macros instead of HAVE_PROCFS.
-rw-r--r-- | src/config.h | 4 | ||||
-rw-r--r-- | src/zmalloc.c | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/config.h b/src/config.h index db33407c5..97c599745 100644 --- a/src/config.h +++ b/src/config.h @@ -45,7 +45,9 @@ /* Test for proc filesystem */ #ifdef __linux__ -#define HAVE_PROCFS 1 +#define HAVE_PROC_STAT 1 +#define HAVE_PROC_MAPS 1 +#define HAVE_PROC_SMAPS 1 #endif /* Test for task_info() */ diff --git a/src/zmalloc.c b/src/zmalloc.c index 1f8c7f08e..a9ba09435 100644 --- a/src/zmalloc.c +++ b/src/zmalloc.c @@ -252,7 +252,7 @@ void zmalloc_set_oom_handler(void (*oom_handler)(size_t)) { * function RedisEstimateRSS() that is a much faster (and less precise) * version of the funciton. */ -#if defined(HAVE_PROCFS) +#if defined(HAVE_PROC_STAT) #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> @@ -325,7 +325,7 @@ float zmalloc_get_fragmentation_ratio(void) { return (float)zmalloc_get_rss()/zmalloc_used_memory(); } -#if defined(HAVE_PROCFS) +#if defined(HAVE_PROC_SMAPS) size_t zmalloc_get_private_dirty(void) { char line[1024]; size_t pd = 0; |