I agree that users should pair allocators as a portability guarantee.
That said, I think it's clearly a good implementation goal for UnsafeMutablePointer allocation to be "C compatible"; that's just not very well-defined goal. It's impossible for Swift to provide a platform indepedent guarantee of malloc/free compatibility because Swift supports (over)aligned allocation. I do think that if the platform provides a free-compatible aligned_alloc, then Swift should provide a free-compatible allocate/deallocate. If the user wants to dynamically override allocation, then they would need to override the relevant C library entry points used by Swift. Optimizing manual allocation via UnsafeMutablePointer is a secondary concern. It should never be done to the extent that it breaks C compatibility. If there's a need to allocate buffers differently in Swift, that should be done via something like the ManagedBuffer API.
As far as I can tell, C11 and C++17 have the same issue with aligned_alloc. The difference is that the C/C++ standard libraries make this API available conditionally only when supported, whereas Swift always supports alignment with what I would call a reasonable effort at compatibility. If anyone knows more about these issues with stdlib, or knows of any aligned allocation API on Windows that is free-compatible, I'd be interested in that.