Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
62090669
Commit
62090669
authored
Nov 14, 2014
by
antirez
Browse files
Fix non-linux builds error introduced with THP checks.
parent
8a75ec0f
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/latency.c
View file @
62090669
...
@@ -73,6 +73,7 @@ int THPIsEnabled(void) {
...
@@ -73,6 +73,7 @@ int THPIsEnabled(void) {
fclose
(
fp
);
fclose
(
fp
);
return
(
strstr
(
buf
,
"[never]"
)
==
NULL
)
?
1
:
0
;
return
(
strstr
(
buf
,
"[never]"
)
==
NULL
)
?
1
:
0
;
}
}
#endif
/* Report the amount of AnonHugePages in smap, in bytes. If the return
/* Report the amount of AnonHugePages in smap, in bytes. If the return
* value of the function is non-zero, the process is being targeted by
* value of the function is non-zero, the process is being targeted by
...
@@ -80,7 +81,6 @@ int THPIsEnabled(void) {
...
@@ -80,7 +81,6 @@ int THPIsEnabled(void) {
int
THPGetAnonHugePagesSize
(
void
)
{
int
THPGetAnonHugePagesSize
(
void
)
{
return
zmalloc_get_smap_bytes_by_field
(
"AnonHugePages:"
);
return
zmalloc_get_smap_bytes_by_field
(
"AnonHugePages:"
);
}
}
#endif
/* ---------------------------- Latency API --------------------------------- */
/* ---------------------------- Latency API --------------------------------- */
...
...
src/zmalloc.c
View file @
62090669
...
@@ -356,7 +356,7 @@ size_t zmalloc_get_smap_bytes_by_field(char *field) {
...
@@ -356,7 +356,7 @@ size_t zmalloc_get_smap_bytes_by_field(char *field) {
}
}
#else
#else
size_t
zmalloc_get_smap_bytes_by_field
(
char
*
field
)
{
size_t
zmalloc_get_smap_bytes_by_field
(
char
*
field
)
{
REDIS_NOTUSED
(
field
);
((
void
)
field
);
return
0
;
return
0
;
}
}
#endif
#endif
...
...
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