RFR [9] 8035897 : FD_SETSIZE should be set on macosx

Chris Hegarty chris.hegarty at oracle.com
Fri Feb 28 08:15:01 PST 2014


Thanks for looking at this Michael, comments inline...

On 28/02/14 15:55, Michael McMahon wrote:
> ...
>
> I agree option 2 sounds better since adding (say) 4k * sizeof(fd_set) to
> the stack is quite
> significant given that it would rarely be required.

Agreed.

> On the change itself I noticed one path in bsd_close.c NET_Timeout where
> the malloc'd buffer
> is not freed (line 418)

D'oh. Fixed.

> Is it potentially more efficient to use calloc() rather than malloc() +
> memset()?

Changed to calloc.

> Maybe a test might need a shell script to call "ulimit -n 4096" or
> something to be able to test it.

It maybe shell related, but even with 'ulimit -n' = 256, the test in the 
latest webrev seems to blow through this soft limit without problem.

Updated webrev:
   http://cr.openjdk.java.net/~chegar/8035897/webrev.01/webrev/

-Chris.

>
> Michael
>
>


More information about the net-dev mailing list