Re: using mmap on large (> 2 Gig) files



Martin v. Löwis wrote:
myeates@xxxxxxxxxxxx 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,

NumPy uses the mmap object and I saw a paper at SciPy 2006 that used Python 2.5 + mmap + numpy to do some pretty nice and relatively fast manipulations of very large data sets.

So, the very useful changes by Martin have seen more testing than he is probably aware of.

-Travis

.



Relevant Pages

  • Re: On Whose Desktop
    ... Leung, Dino Viehland (core developer of IronPython), Titus Brown, Ivan ... Any women in Python you could ask - how about Anna Ravenscroft? ... I hope *everyone* knows that Martin was the winner of this year's Frank ...
    (comp.lang.python)
  • Re: undefined symbol: PyUnicodeUCS4_FromUnicode
    ... When I removed the python stuff in /usr ... Martin v. Löwis wrote: ... > Bill Hodges wrote: ... >> Python then compiled to UCS4 ...
    (comp.lang.python)
  • Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler
    ... Martin v. Löwis wrote: ... >> Answer from people which do not respect coherence of writings? ... The python team should provide the fundamental infrastructure for the ...
    (comp.lang.python)
  • Re: Tremendous slowdown due to garbage collection
    ... Martin said that the default settings for the cyclic gc works for most ... typical for common application but typical for an artificial benchmark. ... Python is optimized for regular apps, not for benchmark (like some video ... much less memory - and memory Python 2.5 and older will never release ...
    (comp.lang.python)