qemu-block
[Top][All Lists]
Advanced

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

Re: [PATCH v2 6/9] util: Share qemu_try_memalign() implementation betwee


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v2 6/9] util: Share qemu_try_memalign() implementation between POSIX and Windows
Date: Fri, 4 Mar 2022 15:02:26 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.1

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.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220226180723.1706285-7-peter.maydell@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é <f4bug@amsat.org>



reply via email to

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