Fix argument order for aligned_alloc on mac.

I pasted this from the _aligned_malloc() branch, and _aligned_malloc()
apparently has the argments swapped compared to aligned_alloc() :/

Bug: chromium:1098741
Change-Id: Iddd92a7beb9e75ddc63b96f757457ec4258fd1ca
This commit is contained in:
Nico Weber 2020-06-25 13:25:51 -04:00 committed by Peng Huang
parent 1268da7b97
commit 5ef3d923d5

View file

@ -3959,7 +3959,7 @@ void *vma_aligned_alloc(size_t alignment, size_t size)
{
#if defined(__APPLE__)
if (__builtin_available(macOS 10.15, iOS 13, *))
return aligned_alloc(size, alignment);
return aligned_alloc(alignment, size);
#endif
// alignment must be >= sizeof(void*)
if(alignment < sizeof(void*))