MAXFILES in subr_param.c

Ivan Voras ivoras at freebsd.org
Mon Dec 8 11:41:52 PST 2008


Hi,

I'm looking at kern/subr_param.c:

 72 #ifndef MAXFILES
 73 #define MAXFILES (maxproc * 2)
 74 #endif



Shouldn't this be at least maxproc*3, for stdin,out,err for every proc?

Also, it looks like MAXFILES is used only once, and in a bit funny way:

238         maxfiles = MAXFILES;
239         TUNABLE_INT_FETCH("kern.maxfiles", &maxfiles);
240         maxprocperuid = (maxproc * 9) / 10;
241         maxfilesperproc = (maxfiles * 9) / 10;

Historical reasons?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 258 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20081208/414875f0/signature.pgp


More information about the freebsd-hackers mailing list