curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

RE: Curl_poll and Windows

From: Daniel Stenberg via curl-library <>
Date: Thu, 21 Nov 2019 15:45:06 +0100 (CET)

On Tue, 19 Nov 2019, Jeff Mears wrote:

>> We'll happily welcome patches that improve libcurl, in this area as well as
>> others! This is all news to me and yet I've toyed with these things for a
>> while... albeit, not much on Windows.
> Sure, I'll consider it. The only issue that comes to mind is, in curl-land,
> how would I malloc() memory that is aligned to at least _Alignof(SOCKET)?
> I suppose that this ought to happen automatically if the hosting
> application's malloc is sane.

malloc is defined [1] to return memory aligned for this:

"The pointer returned if the allocation succeeds shall be suitably aligned so
that it may be assigned to a pointer to any type of object and then used to
access such an object"

[1] =

  / | Get the best commercial curl support there is - from me
                   | Private help, bug fixes, support, ports, new features
Received on 2019-11-21