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 60097d361d4096d3826c7580acffd4053f8a4835)
This commit is contained in:
Jan-Erik Rediger 2020-09-09 14:06:04 +02:00 committed by Oran Agra
parent 82aee21c92
commit b8dec46e0b

View File

@ -71,7 +71,7 @@ int THPIsEnabled(void) {
return 0;
}
fclose(fp);
return (strstr(buf,"[never]") == NULL) ? 1 : 0;
return (strstr(buf,"[always]") != NULL) ? 1 : 0;
}
#endif