using mmap on large (> 2 Gig) files
sturlamolden
sturlamolden at yahoo.no
Tue Oct 24 18:55:15 EDT 2006
Martin v. Löwis wrote:
Your news server doesn't honour cancel as well...
> It doesn't need to, why do you think it does?
This was an extremely stupid question on my side. It needs to be
flushed after a write because that's how the memory pages mapping the
file is synchronized with the file. Write ops to the memory mapping
addresses isn't immediately synchronized with the file on disk. Both
Windows and UNIX require this. I should think before I write, but I
realized this after posting and my cancel didn't reach you.
> Read the source, Luke. It uses mmap or MapViewOfFile, depending
> on the platform.
Yes, indeed.
More information about the Python-list
mailing list