diff options
Diffstat (limited to 'gcc/cppfiles.c')
-rw-r--r-- | gcc/cppfiles.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/cppfiles.c b/gcc/cppfiles.c index 6b99b616e06..ffb46d26b1f 100644 --- a/gcc/cppfiles.c +++ b/gcc/cppfiles.c @@ -272,6 +272,7 @@ read_include_file (pfile, inc) } size = inc->st.st_size; + inc->mapped = 0; #if MMAP_THRESHOLD if (pagesize == -1) pagesize = getpagesize (); @@ -300,7 +301,6 @@ read_include_file (pfile, inc) } offset += count; } - inc->mapped = 0; } } else if (S_ISBLK (inc->st.st_mode)) @@ -363,9 +363,11 @@ purge_cache (inc) { if (inc->buffer) { +#if MMAP_THRESHOLD if (inc->mapped) munmap ((PTR) inc->buffer, inc->st.st_size); else +#endif free ((PTR) inc->buffer); inc->buffer = NULL; } |