[Python-Dev] Changing ob_size to [s]size_t

Guido van Rossum guido@python.org
Thu, 06 Jun 2002 16:33:57 -0400

> >>Until then, I'd rather like to see the file IO APIs and related
> >>types fixed so that they can handle 2GB files all the way
> >>through.

(I suppose you meant >2GB files.)

> > Which file IO APIs need to be fixed?  I thought we supported large
> > files already (when the OS supports them)?
> The file object does, but what the mmap module doesn't and
> it is not clear to me whether all code in the standard lib
> can actually deal with file positions outside the int range
> (most code probably doesn't care, since it uses .read()
> and .write() exclusively), e.g. can SRE scan mmapped
> files of such size ?

On a 32-bit machine you can mmap at most 2 GB anyway I expect, due to
the VM architecture (and otherwise the limit would obviously be 4 GB).

In which architecture are you interested?  The only place where this
might be a problem is when a pointer is 64 bits but an int is 32 bits.

What other modules are you worried about?

--Guido van Rossum (home page: http://www.python.org/~guido/)