qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3] util/oslib-win32: Use _aligned_malloc for qemu_try_memali


From: Richard Henderson
Subject: Re: [PATCH v3] util/oslib-win32: Use _aligned_malloc for qemu_try_memalign
Date: Sun, 18 Oct 2020 11:38:06 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 10/18/20 11:34 AM, Philippe Mathieu-Daudé wrote:
>> +    g_assert(size != 0);
> 
> "The alignment value, which must be an integer power of 2.",
> so maybe:
> 
>        g_assert(size != 0 && is_power_of_2(alignment));

This is also true of posix_memalign.  If we are going to add this, we should
also assert in the other qemu_try_memalign.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]