using mmap on large (> 2 Gig) files

"Martin v. Löwis" martin at v.loewis.de
Mon Oct 23 19:09:56 EDT 2006


myeates at jpl.nasa.gov schrieb:
> Anyone ever done this? It looks like Python2.4 won't take a length arg
>> 2 Gig since its not seen as an int. 

What architecture are you on? On a 32-bit architecture, it's likely
impossible to map in 2GiB, anyway (since it likely won't fit into the
available address space).

On a 64-bit architecture, this is a known limitation of Python 2.4:
you can't have containers with more than 2Gi items. This limitation
was removed in Python 2.5, so I recommend to upgrade. Notice that
the code has seen little testing, due to lack of proper hardware,
so I shall suggest that you review the mmap code first before using
it (or just test it out and report bugs as you find them).

Regards,
Martin



More information about the Python-list mailing list