OSDN Git Service

* mmap.cc (mmap): Don't reuse anonymous memory in MAP_FIXED case.
authorcorinna <corinna>
Tue, 18 Sep 2001 17:10:08 +0000 (17:10 +0000)
committercorinna <corinna>
Tue, 18 Sep 2001 17:10:08 +0000 (17:10 +0000)
winsup/cygwin/ChangeLog
winsup/cygwin/mmap.cc

index 0ace10c..07ab2e4 100644 (file)
@@ -1,3 +1,7 @@
+Tue Sep 18 18:21:00 2001  Corinna Vinschen <corinna@vinschen.de>
+
+       * mmap.cc (mmap): Don't reuse anonymous memory in MAP_FIXED case.
+
 Mon Sep 17 17:29:25 2001  Christopher Faylor <cgf@cygnus.com>
 
        * include/io.h: Add access declaration.
index b88deb8..89ef69b 100644 (file)
@@ -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)