[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Total failure in dav layer when >1024 files already open

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2006-06-02 18:29:52 CEST

On Fri, 2006-06-02 at 10:35 -0400, Michael Sweet wrote:
> Recent versions of glibc (>= 2.3.2 IIRC) *do* limit FDSET_SIZE to
> 1024, even though the kernel interface has not such limit. The
> response I've been given from the glibc folks is that "we should be
> using poll() instead"...

select has to have a fixed limit because of the nature of its interface.
fd_set cannot be a dynamically allocated structure because you have to
be able to copy it with assignment (plus, there's no deallocation
method), so it must have a fixed size. A limit of 1024 means each
fd_set takes up 128 bytes; if that limit were upped by default to
something larger like 32K, each fd_set would take up 4K of space,
probably on the stack, which would start to cause problems in
multi-threaded programs.

poll has a saner interface, and isn't subject to this problem.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jun 2 18:31:34 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.