From: Zack Weinberg Date: Tue, 27 Nov 2001 07:42:10 +0000 (+0000) Subject: * cppfiles.c (read_include_file): Add comment. X-Git-Tag: prereleases/libstdc++-3.0.95~706 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=07e96fc688ba9fcc49c0e71ce8a3b484feacac52;p=thirdparty%2Fgcc.git * cppfiles.c (read_include_file): Add comment. From-SVN: r47369 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1a22e47bf977..2d6093552dcc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2001-11-27 Zack Weinberg + + * cppfiles.c (read_include_file): Add comment. + 2001-11-26 Richard Henderson * toplev.c (rest_of_compilation): Call free_bb_for_insn before exit. diff --git a/gcc/cppfiles.c b/gcc/cppfiles.c index f0d85d9bf375..65bcf62e07b9 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) {