This makes fd_set on Windows growable by adding additional space to the storing buffer, which effectively extends fd_set.fd_array capacity.
With this change fixed FD_SETSIZE 1024 becomes unnecessarily large (every such fd_set takes more than 8Kb of memory), so it seems reasonable to reduce it to lower value. I guess 128 will do (which is twice as big as default 64).
Also, I removed some unused defines left from old bit-field implementation and tossed local vars in __CFSocketManager function to make them available according to their usage per platform.
This makes
fd_set
on Windows growable by adding additional space to the storing buffer, which effectively extendsfd_set.fd_array
capacity.With this change fixed
FD_SETSIZE 1024
becomes unnecessarily large (every suchfd_set
takes more than 8Kb of memory), so it seems reasonable to reduce it to lower value. I guess128
will do (which is twice as big as default64
).Also, I removed some unused defines left from old bit-field implementation and tossed local vars in
__CFSocketManager
function to make them available according to their usage per platform.Follow-up for #4954. Resolves #4958.