Joe Orton wrote:

If the API guarantee is "may allocate memory on failure" then the fix is bad and should be reverted; the caller will have to do the create/destroy dance anyway so it's needless overhead whether large or small.


This was the case without my patch to unix/sockets.c
I was "will not allocate on Win32, will always allocate on unix".

If the API guarantee is "will not allocate memory on failure" then clearly this fix is necessary. I think this option makes more sense.


Of course we can have "will always allocate memory regardless of failure"
which was the case before the pacth (unix only), but like said it's resource
wasteful, and IMO we all agree on that.

Regards,
Mladen.

Reply via email to