* mmap.cc (mmap): Drop usage of the same memory area if the same
region of the same file is mapped twice.
This commit is contained in:
@@ -499,9 +499,9 @@ mmap (caddr_t addr, size_t len, int prot, int flags, int fd, off_t off)
|
||||
list *l = mmapped_areas->get_list_by_fd (fd);
|
||||
|
||||
/* First check if this mapping matches into the chunk of another
|
||||
already performed mapping. Only valid for MAP_SHARED and for
|
||||
MAP_ANON in a special case of MAP_PRIVATE. */
|
||||
if (l && ((flags & MAP_SHARED) || (fd == -1 && off == 0)))
|
||||
already performed mapping. Only valid for MAP_ANON in a special
|
||||
case of MAP_PRIVATE. */
|
||||
if (l && fd == -1 && off == 0)
|
||||
{
|
||||
mmap_record *rec;
|
||||
if ((rec = l->match (off, len)) != NULL)
|
||||
|
Reference in New Issue
Block a user