[Python-Dev] Changing ob_size to [s]size_t
M.-A. Lemburg
mal@lemburg.com
Thu, 06 Jun 2002 23:39:58 +0200
Guido van Rossum wrote:
>>>>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.)
Yes.
>>>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.
64-bit Unix systems such as AIX 5L.
> What other modules are you worried about?
I'm not worried about any modules... take this as PEP-42 wish:
someone would need to check all the code using e.g. file.seek()
and file.tell() to make sure that it works correctly with
long values.
--
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
______________________________________________________________________
Company & Consulting: http://www.egenix.com/
Python Software: http://www.egenix.com/files/python/
Meet us at EuroPython 2002: http://www.europython.org/