In article <[EMAIL PROTECTED]>, "sturlamolden" <[EMAIL PROTECTED]> wrote: ... > It seems that Python does take a length argument, but not an offset > argument (unlike the Windows' CreateFileMapping/MapViewOfFile and UNIX' > mmap), so you always map from the beginning of the file. Of course if > you have ever worked with memory mapping files in C, you will probably > have experienced that mapping a large file from beginning to end is a > major slowdown.
I certainly have not experienced that. mmap itself takes nearly no time, there should be no I/O. Access to mapped pages may require I/O, but there is no way around that in any case. > I haven't looked at the source, but I'd be surprised if Python actually > maps the file into the process image when mmap is called. I believe > Python is not memory mapping at all; rather, it just opens a file in > the file system and uses fseek to move around. Wow, you're sure a wizard! Most people would need to look before making statements like that. Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list