apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mladen Turk <mt...@apache.org>
Subject Re: svn commit: r442492 - /apr/apr/branches/1.2.x/network_io/unix/sockets.c
Date Wed, 20 Sep 2006 10:48:56 GMT
William A. Rowe, Jr. wrote:
> Joe Orton wrote:
> Yes - please do.  One aspect of this patch I strongly dislike is the fact
> that it's much less efficient.  If the pool associated with the soon-to-be
> allocated apr_socket_t would be destroyed on accept failure (the TYPICAL
> design paradigm) there's no reason to avoid this allocation, and we've
> watched sa buffers grow as the network layer has become richer (e.g. IPV6)
> which makes stack a suboptimal place to place such buffers.

I agree, but then all platforms must behave in the same fashion.
Without the patch, the Win32 does not allocate the socket in case
accept fails, while unix and others does.
So, either we'll have the Win32 way of doing accept or the unix one.
I personally think that not allocating apr_socket_t if the accept
fails would give the simpler programming interface without
worrying on memory usage, and that would at least allow much
faster non-blocking socket accept without the need to create/destroy
pools on each APR_EAGAIN.

However, any mode is fine if its consistent across the platforms,
which is not the case right now.


View raw message