From 7cffc3456406049fb3b87698d5725a041711eaa0 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 18 Sep 2001 17:10:09 +0000 Subject: [PATCH] * mmap.cc (mmap): Don't reuse anonymous memory in MAP_FIXED case. --- winsup/cygwin/ChangeLog | 4 ++++ winsup/cygwin/mmap.cc | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 0ace10c9b..07ab2e4e3 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +Tue Sep 18 18:21:00 2001 Corinna Vinschen + + * mmap.cc (mmap): Don't reuse anonymous memory in MAP_FIXED case. + Mon Sep 17 17:29:25 2001 Christopher Faylor * include/io.h: Add access declaration. diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc index b88deb872..89ef69b27 100644 --- a/winsup/cygwin/mmap.cc +++ b/winsup/cygwin/mmap.cc @@ -503,7 +503,7 @@ mmap (caddr_t addr, size_t len, int prot, int flags, int fd, off_t off) /* First check if this mapping matches into the chunk of another already performed mapping. Only valid for MAP_ANON in a special case of MAP_PRIVATE. */ - if (l && fd == -1 && off == 0) + if (l && fd == -1 && off == 0 && !(flags & MAP_FIXED)) { mmap_record *rec; if ((rec = l->match (off, len)) != NULL)