Re: mmap with MAP_PRIVATE is useless

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/14/2010 02:53 AM, Junio C Hamano wrote:
Back when most of these mmap calls were written by Linus and myself,
we weren't interested in using MAP_PRIVATE, or any other trick for
that matter, to deal with the case where the user tells git to go
index a file, and then mucks with the file before git finishes and
gives back control.

Eh, this one in particular (in index_fd) is quite ancient...

commit e83c5163316f89bfbde7d9ab23ca2e25604af290
Author: Linus Torvalds <torvalds@xxxxxxxxxxxxxxx>
Date:   Thu Apr 7 15:13:13 2005 -0700

    Initial revision of "git", the information manager from hell

:-)

There were three mmap calls -- in read_sha1_file, read_cache and index_fd -- and all three were of the same mmap (NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0) shape.

Paolo
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]