lkml.org 
[lkml]   [1997]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: How to increse [sic.] max open files?
Date
In linux.dev.kernel, article <5andlm$ikg@palladium.transmeta.com>,
hpa@transmeta.com (H. Peter Anvin) writes:
> By author: yuri@rgti.com (yuri mironoff)
> >
> > Forgive my ignorance but why not implement dynamic file descriptor
> > allocation??? All these arguments about a maximum NR_OPEN would then
> > become inconsequential.
>
> It ain't so easy, and it's BSD's fault. select() has a very nice way
> to ensure that a bitmask of file descriptors is the right size, but
> the FD_* support routines immediately bungles that very nice idea by
> effectively requiring the maximum number of file descriptors
> (technically, the largest possible numerical value of a file
> descriptor) to be known at compile time. There is no way in C to

This is the kernel mailing list. The first step is to fix the kernel,
including 2.0.27+, to support "unlimited" fd_sets. This hasn't happened
yet. (Somebody said he's working on this..?)

After that has happened, we can think about application programs.
Most programs won't ever open more files than the default FD_SETSIZE.
Those that do should just define a reasonable maximum they can handle,
or allocate the fd_set buffers themselves (it's not that difficult even if
you don't use C++).

--
For the first time we have a weapon that nobody has used for thirty years.
This gives me great hope for the human race.
--Harlan Ellison
--
Matthias Urlichs \ noris network GmbH / Xlink-POP Nürnberg
Schleiermacherstraße 12 \ Linux+Internet / EMail: urlichs@noris.de
90491 Nürnberg (Germany) \ Consulting+Programming+Networking+etc'ing
PGP: 1024/4F578875 1B 89 E2 1C 43 EA 80 44 15 D2 29 CF C6 C7 E0 DE
Click <A HREF="http://info.noris.de/~smurf/finger">here</A>. 42

\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.032 / U:3.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site