3 ms·
Because most POSIX systems, including Linux, provide even almost nothing to help with hinting about page management, but write() (and the implicit copy) provide
by cbsmith 12y ago
Because most POSIX systems, including Linux, provide even almost nothing to help with hinting about page management, but write() (and the implicit copy) provides better ways to be explicit about that.
- fiatmoney 12y agoCould you go into more detail? mmap lets you specify some flags about access patterns; write() doesn't give you any such hints.
- woadwarrior01 12y agoCorrect me if I'm wrong. I think he's talking about posix_fadvise() [1], which lets you pre declare access patterns for an fd. And you're talking about madvise() [2]. [1]: http://linux.die.net/man/2/posix_fadvise http://linux.die.net/man/2/posix_fadvise [2]: http://linux.die.net/man/2/madvise http://linux.die.net/man/2/madvise
- cbsmith 12y ago...and madvise hardly does anything.
- cbsmith 12y agoYou ever tried doing an append only mmap? ;-)