diff options
author | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-11-27 07:42:10 +0000 |
---|---|---|
committer | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-11-27 07:42:10 +0000 |
commit | de27a4735751b94d7822a3bb977eb410a4dc98e0 (patch) | |
tree | 5c35e1a8044ac5dd77b1e3143e71814c99932d3c /gcc/cppfiles.c | |
parent | de4998ea667e1a18f625a18406a12cbcc92dea01 (diff) | |
download | gcc-de27a4735751b94d7822a3bb977eb410a4dc98e0.tar.gz |
* cppfiles.c (read_include_file): Add comment.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47369 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cppfiles.c')
-rw-r--r-- | gcc/cppfiles.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/cppfiles.c b/gcc/cppfiles.c index f0d85d9bf37..65bcf62e07b 100644 --- a/gcc/cppfiles.c +++ b/gcc/cppfiles.c @@ -382,6 +382,11 @@ read_include_file (pfile, inc) if (pagesize == -1) pagesize = getpagesize (); + /* Use mmap if the file is big enough to be worth it (controlled + by MMAP_THRESHOLD) and if we can safely count on there being + at least one readable NUL byte after the end of the file's + contents. This is true for all tested operating systems when + the file size is not an exact multiple of the page size. */ if (size / pagesize >= MMAP_THRESHOLD && (size % pagesize) != 0) { |