Messages in this thread |  | | From | (H. Peter Anvin) | Subject | Re: How to increse [sic.] max open files? | Date | 5 Jan 1997 05:19:50 GMT |
| |
Followup to: <Pine.HPP.3.95.970103161052.25250A-100000@gapk20.rgti.com> By author: yuri@rgti.com (yuri mironoff) In newsgroup: linux.dev.kernel > > 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 implement a compatible interface, and have dynamic allocation, although it is possible in C++ by using contructors/destructors.
-hpa
-- This space intentionally has nothing but text explaining why this space has nothing but text explaining why this space would otherwise have been left blank, and would otherwise have been left blank.
|  |