Re: fork: out of memory

Alan Cox (alan@lxorguk.ukuu.org.uk)
Tue, 25 Nov 1997 11:07:43 +0000 (GMT)


> Hmm ... FreeBSD gets round this by allowing you to
> redefine FD_SETSIZE in your own programs before you

You can do this in Linux. And like in BSDI it doesnt work
for all cases. the fd_set size is compiled into some libc
functions (notably NIS stuff). You use fd 0-4093 and nis
stops working cos its fd is outside its fdset size.

glibc knows how to handle this right

> I'm not a FreeBSD advocate, by the way, but this does
> seem to be one thing they got right :-)

I dont know if they got the libc one right.

The 2.0 patch fixes one problem in the Linux case, the kernel pulled the
fd_set onto the kernel stack (only 4K long). So 3K fds broke. The 2.1.x
kernel allocates a buffer for the large fdset case which allows you
to go high without patching

Alan