Commit 8b0d797e authored by Jan-Erik Rediger's avatar Jan-Erik Rediger Committed by Oran Agra
Browse files

Check that THP is not set to always (madvise is ok) (#4001)

THP can also be set to madvise, in which case it shouldn't cause
problems for Redis since redis (or the allocator) doesn't use madvise
to activate it.

(cherry picked from commit b2419c31)
parent 3c8b3945
...@@ -71,7 +71,7 @@ int THPIsEnabled(void) { ...@@ -71,7 +71,7 @@ int THPIsEnabled(void) {
return 0; return 0;
} }
fclose(fp); fclose(fp);
return (strstr(buf,"[never]") == NULL) ? 1 : 0; return (strstr(buf,"[always]") != NULL) ? 1 : 0;
} }
#endif #endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment