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