Skip to content

Commit

Permalink
Merge pull request #2667 from brauner/2018-10-02/prefault_mmaped_conf…
Browse files Browse the repository at this point in the history
…ig_file

parse: prefault config file with MAP_POPULATE
  • Loading branch information
stgraber committed Oct 2, 2018
2 parents 907e133 + 2291ea4 commit 7040a77
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lxc/parse.c
Expand Up @@ -88,7 +88,8 @@ int lxc_file_for_each_line_mmap(const char *file, lxc_file_cb callback,
return 0;
}

buf = lxc_strmmap(NULL, st.st_size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
buf = lxc_strmmap(NULL, st.st_size, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_POPULATE, fd, 0);
if (buf == MAP_FAILED) {
close(fd);
return -1;
Expand Down

0 comments on commit 7040a77

Please sign in to comment.