| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 11d3e71 commit 00309ee
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -260,6 +260,8 @@ struct text_region FindNodeTextRegion() { | |||
| 260 | 260 | bool IsTransparentHugePagesEnabled() { | |
| 261 | 261 | std::ifstream ifs; | |
| 262 | 262 | ||
| 263 | + // File format reference: | ||
| 264 | + // https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/mm/huge_memory.c?id=13391c60da3308ed9980de0168f74cce6c62ac1d#n163 | ||
| 263 | 265 | ifs.open("/sys/kernel/mm/transparent_hugepage/enabled"); | |
| 264 | 266 | if (!ifs) { | |
| 265 | 267 | PrintWarning("could not open /sys/kernel/mm/transparent_hugepage/enabled"); | |
@@ -268,7 +270,7 @@ bool IsTransparentHugePagesEnabled() { | |||
| 268 | 270 | ||
| 269 | 271 | std::string always, madvise; | |
| 270 | 272 | if (ifs.is_open()) { | |
| 271 | - while (ifs >> always >> madvise) {} | ||
| 273 | + ifs >> always >> madvise; | ||
| 272 | 274 | } | |
| 273 | 275 | ifs.close(); | |
| 274 | 276 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments