On Fri, 12 Nov 2004 09:01:32 -0500, Tolkin, Steve <[EMAIL PROTECTED]> wrote:
> I think there may be a more restrictive limit, at least on Windows.
> The OS must be able to find a contiguous block
> of virtual memory, i.e. in pagefile.sys.
> The paging file may not be able to grow, (depending on
> how it is configured) and there may not be a large enough block.

Given how mmap is supposed to work, I'd doubt this diagnosis.
I'm not saying that you're wrong, I'm just saying that this would
be a strange limitation.

What mmap is supposed to do is cause a section of your
address space to transparently be a file on disk.  It should not
actually read that data in, that is done for you on demand when
you access data.  (I guess an implementation could do that, but
the Unix ones certainly don't.)

However it does need to find a contiguous block of address
space in your process memory space to map that data into.

> I would like to learn more about the exact situation of memory mapping
> files
> on Windows -- the above is just based on a hour of Googling
> and the info below.

Well mmap is a Unix concept.  To the best of my knowledge
it is not natively supported in Windows.  If you have it, it will
be implemented by whatever Unix emulation you're using.
For instance if you're using MKS then see
http://mkssoftware.com/docs/man3/mmap.3.asp, if you're
using cygwin see your local cygwin documentation.

It may be that the emulations have additional limits that I
don't know about.  (I don't use Windows.)

> Non perl related info follows:
> I hit this limitation in the otherwise excellent disk indexing program
> Wilbur at http://wilbur.redtree.com which is free (as in beer) and open
> source too.
> (But for Windows only.)
> 
> It uses memory mapped files and when one of the indexes exceeds
> about 500 MB it says something like "unable to map view of a file"
> even though my pagefile.sys is 1536 MB.
> 
> The developer said:
> This is a system message that occurs when Wilbur is unable to memory map
> one
> of its index files and due to the way memory mapping works on Windows, I
> think
> this is normally a symptom of insufficient virtual memory space.
> Possible
> solutions might be increasing the size of your paging file (dig through
> the
> performance options on the system control panel to find this),
> defragmenting
> the disk and of course adding more real memory.

Googling for that, I see him saying the same thing at

http://wilbur.redtree.com/cgi-bin/wilburtalk.pl?noframes;read=1770

Like him, I have no idea why pagefile.sys would enter into the
picture.  It certainly doesn't on Linux.

Cheers,
Ben
_______________________________________________
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to