Mail Archives: cygwin/2007/01/18/12:19:20
On Jan 18 10:14, Corinna Vinschen wrote:
> On Jan 17 13:42, Brian Ford wrote:
> > mmap.cc:1203 mmap64():
> > map_list = mmapped_areas.get_list_by_fd (fd);
> > mmap.cc:982 mmap_worker():
> > if (!(map_list = mmapped_areas.get_list_by_fd (fd))
> > mmap.cc:983 mmap_worker():
> > && !(map_list = mmapped_areas.add_list (fd)))
> >
> > Also:
> >
> > mmap.cc:1134 mmap64():
> > DWORD low = GetFileSize (fh->get_handle (), &high);
> >
> > [...]
> > PS. Since this isn't a bug, I don't expect you to do any more than
> > consider putting it in your long term low priority que or reply with a PTC
> > Thanks for the evaluation tuits ;-).
>
> Right, it's an optimization problem rather than a bug. Patches
> welcome, but I've put it on my TODO list, too.
I have applied a patch to CVS which calls fstat early, at the spot where
GetFileSize got called so far. The stat structure is then propagated to
subsequent function calls and used there. This should reduce the fstat
calls to exactly one per file based mmap call. All my testcases still
work fine, but we already saw that my testcases don't cover all weird
cases in the world. So, please give this change a serious test.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -