On Fri, Mar 06, 2009 at 10:20:02AM +0100, Alon Noy wrote:
> When I'm running my libevent based application under valgrind I'm
> getting messages about memory access violations in epoll.c. when
> changing line 125 from:
> 
> nfiles = rl.rlim_cur - 1;
> 
> to:
> 
> nfiles = rl.rlim_cur;
> 
> then the application runs with no complains from valgrind. The problems
> shows when reaching the limit of allowed open file descriptors.
> 

Hm!  I suppose there's nothing necessarily wrong with omitting the -1
on non-Solaris platforms, if the goal is to be able to run right up to
rlim_cur active fds.  Out of curiosity, what was the valgrind error
you were seeing?

> >From the remark above this line I understand that the -1 was hacked in
> because some issue with Solaris but was it ever tested with other
> platforms?

Yes.  I develop on Linux and OS X, and IIRC Niels is pretty eclectic
about his OS choices.  It would be neat to have a regression test for
this case, if you have the time to write one.

Yrs,
-- 
Nick Mathewson
_______________________________________________
Libevent-users mailing list
Libevent-users@monkey.org
http://monkeymail.org/mailman/listinfo/libevent-users

Reply via email to