using mmap on large (> 2 Gig) files

Chetan pandyacus.xspam at xspam.sbcglobal.net
Sat Oct 28 10:06:00 EDT 2006


"nnorwitz at gmail.com" <nnorwitz at gmail.com> writes:

> Martin v. Löwis wrote:
> > sturlamolden schrieb:
> >
> > > And why doesn't Python's mmap take an offset argument to handle large
> > > files?
> >
> > I don't know exactly; the most likely reason is that nobody has
> > contributed code to make it support that. That's, in turn, probably
> > because nobody had the problem yet, or nobody of those who did
> > cared enough to implement and contribute a patch.
> 
> Or because no one cared enough to test a patch that was produced 2.5
> years ago (not directed at Martin, just pointing out why the patch
> stalled).
> 
>   http://python.org/sf/708374
> 
> With just a little community support, this can go in.  I suppose now
> that we have the buildbots, we can check in untested code and test it
> that way.  The patch should be reviewed.
> 
> n
I made the changes before I saw this. However, the patch seems to be quite
dated and some of the changes are very interesting, especially if they were
tested for the special conditions they are supposed to handle and 
if they were made after some discussion. 
I can submit my patch as it is, but I am working on making some of the other
changes I had in mind for the mmap to be useful.
Some of the other changes would make more sense for py3k, if it supports a byte
array object, but I haven't looked at py3k at all.

Chetan



More information about the Python-list mailing list