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~