On 4/3/22 12:21, Peter Maydell wrote:
The qemu_try_memalign() functions for POSIX and Windows used to be
significantly different, but these days they are identical except for
the actual allocation function called, and the POSIX version already
has to have ifdeffery for different allocation functions.

Move to a single implementation in memalign.c, which uses the Windows
_aligned_malloc if we detect that function in meson.

Signed-off-by: Peter Maydell <peter.mayd...@linaro.org>
Reviewed-by: Richard Henderson <richard.hender...@linaro.org>
Message-id: 20220226180723.1706285-7-peter.mayd...@linaro.org
---
  meson.build        |  1 +
  util/memalign.c    | 39 +++++++++++++++++++++++++++++++++++++++
  util/oslib-posix.c | 29 -----------------------------
  util/oslib-win32.c | 17 -----------------
  4 files changed, 40 insertions(+), 46 deletions(-)

Nice.

Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org>

Reply via email to