Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
dd905417
Commit
dd905417
authored
Nov 21, 2012
by
antirez
Browse files
Use more fine grained HAVE macros instead of HAVE_PROCFS.
parent
c342b075
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/config.h
View file @
dd905417
...
...
@@ -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() */
...
...
src/zmalloc.c
View file @
dd905417
...
...
@@ -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_PROC
FS
)
#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_PROC
F
S)
#if defined(HAVE_PROC
_SMAP
S)
size_t
zmalloc_get_private_dirty
(
void
)
{
char
line
[
1024
];
size_t
pd
=
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment