h2o / picotls

TLS 1.3 implementation in C (master supports RFC8446 as well as draft-26, -27, -28)
536 stars 140 forks source link

[fusion][windows] Use `_aligned_free` #454

Closed kazuho closed 1 year ago

kazuho commented 1 year ago

aligned_alloc is unavailable on Windows and we map that to _aligned_malloc at lib/fusion.c line 63.

Official documentation of _aligned_malloc states: Don't use free, which doesn't reclaim the aligned memory correctly and can lead to hard-to-diagnose bugs.

huitema commented 1 year ago

Looks good.

Isn't handling multiple platforms fun?

By the way, what happened to the proposal to replace "#ifdef _WINDOWS" by "_WIN32"?

kazuho commented 1 year ago

Isn't handling multiple platforms fun?

It is always surprising how costly it is to support platforms that only support legacy standards; let the standard be ISO C or an IETF protocol :-)

@huitema Re _WIN32, I believe @mattn pushed an empty commit to rerun the CI on AppVeyor. Would you mind taking a look?