write a 20GB file

Patrick Maupin pmaupin at gmail.com
Sat May 15 20:32:38 EDT 2010


On May 15, 7:09 pm, Dave Angel <da... at ieee.org> wrote:
> Nathan Rice wrote:
> > This is precisely the situation mmap was made for :)  It has almost the same
> > methods as a file so it should be an easy replacement.
>
> > <snip>
>
> Only on a 64bit system, and I'm not sure it's even possible there in
> every case.  On a 32bit system, it would be impossible to mmap a 20gb
> file.  You only have 4gb of address space to play with, total.
>
> DaveA

Well, depending on the OS, I think you could have multiple mappings
per file.  So you could maintain your own mapping cache.  That could
get a bit ugly, but depending on what you are doing, it might not be
too bad.

Regards,
Pat



More information about the Python-list mailing list