regex over files

Jeremy Bowers jerf at jerf.org
Tue Apr 26 17:39:16 EDT 2005


On Tue, 26 Apr 2005 20:54:53 +0000, Robin Becker wrote:

> Skip Montanaro wrote:
> ...
>> If I mmap() a file, it's not slurped into main memory immediately, though as
>> you pointed out, it's charged to my process's virtual memory.  As I access
>> bits of the file's contents, it will page in only what's necessary.  If I
>> mmap() a huge file, then print out a few bytes from the middle, only the
>> page containing the interesting bytes is actually copied into physical
>> memory.
> ....
> my simple rather stupid experiment indicates that windows mmap at least 
> will reserve 25Mb of paged file for a linear scan through a 25Mb file. I 
> probably only need 4096b to scan. That's a lot less than even the page 
> table requirement. This isn't rocket science just an old style observation.

Are you trying to claim Skip is wrong, or what? There's little value in
saying that by mapping a file of 25MB into VM pages, you've increased your
allocated paged file space by 25MB. That's effectively tautological. 

If you are trying to claim Skip is wrong, you *do not understand* what you
are talking about. Talk less, listen and study more. (This is my best
guess, as like I said, observing that allocating things increases the
number of things that are allocated isn't worth posting so my thought is
you think you are proving something. If you really are just posting
something tautological, my apologies and disregard this paragraph but,
well, it's certainly not out of line at this point.)



More information about the Python-list mailing list