]> git.proxmox.com Git - mirror_qemu.git/commit - meson.build
util: Share qemu_try_memalign() implementation between POSIX and Windows
authorPeter Maydell <peter.maydell@linaro.org>
Sat, 26 Feb 2022 18:07:20 +0000 (18:07 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 7 Mar 2022 13:15:24 +0000 (13:15 +0000)
commit5c8c714a0a78dfd0bb7b04e796b96eb5d41f1292
tree66df25e1491dd3b1792866a5c51ce3dac55451ea
parent8698343b867224c1742d75dfdc276061c5839dc8
util: Share qemu_try_memalign() implementation between POSIX and Windows

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.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220226180723.1706285-7-peter.maydell@linaro.org
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
meson.build
util/memalign.c
util/oslib-posix.c
util/oslib-win32.c