From: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
To: Thomas Huth <thuth@redhat.com>, Junjie Mao <junjie.mao@intel.com>,
qemu-devel@nongnu.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Daniel P. Berrangé " <berrange@redhat.com>,
"Philippe Mathieu-Daudé " <philmd@linaro.org>,
"Pierrick Bouvier" <pierrick.bouvier@linaro.org>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Gustavo Romero" <gustavo.romero@linaro.org>,
"Alex Benné e" <alex.bennee@linaro.org>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Zhao Liu" <zhao1.liu@intel.com>
Subject: Re: [PATCH v8 6/8] rust: add crate to expose bindings and interfaces
Date: Mon, 26 Aug 2024 14:29:07 +0300 [thread overview]
Message-ID: <itpbj.iuoq6f0pob1o@linaro.org> (raw)
In-Reply-To: <c6c08785-3bd6-42a0-9fe8-ecd52974ecde@redhat.com>
On Mon, 26 Aug 2024 11:24, Thomas Huth <thuth@redhat.com> wrote:
>On 26/08/2024 08.41, Manos Pitsidianakis wrote:
>> On Mon, 26 Aug 2024 08:31, Junjie Mao <junjie.mao@intel.com> wrote:
>>>> +unsafe impl GlobalAlloc for QemuAllocator {
>>>> + unsafe fn alloc(&self, layout: Layout) -> *mut u8 {
>>>> + if layout.align() == 0 {
>>>> + g_malloc0(layout.size().try_into().unwrap()).cast::<u8>()
>>>> + } else {
>>>> + g_aligned_alloc0(
>>>
>>> One more thing: g_aligned_alloc0() was introduced in glib 2.72 [1] but the
>>> current glib version check in meson is >= 2.66.0.
>>>
>>> Glib 2.72 still supports Win 7+, so no increase to _WIN32_WINNT is needed
>>> for this version bumping.
>>>
>>> [1] https://docs.gtk.org/glib/func.aligned_alloc0.html
>>> [2]
>>> https://gitlab.gnome.org/GNOME/glib/-/blob/2.72.0/meson.build?ref_type=tags#L509
>>
>> Hm. Was there no way to have aligned allocations before 2.72? We can emit a
>> cfg from meson if glib is <2.72 and handle it differently.
>
>Can't you simply use our qemu_memalign() function instead?
Thanks, that'd solve the problem.
next prev parent reply other threads:[~2024-08-26 11:31 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-23 8:11 [PATCH v8 0/8] Add Rust build support, ARM PL011 device impl Manos Pitsidianakis
2024-08-23 8:11 ` [PATCH v8 1/8] Require meson version 1.5.0 Manos Pitsidianakis
2024-08-23 8:11 ` [PATCH v8 2/8] build-sys: Add rust feature option Manos Pitsidianakis
2024-08-23 8:11 ` [PATCH v8 3/8] configure, meson: detect Rust toolchain Manos Pitsidianakis
2024-08-23 8:11 ` [PATCH v8 4/8] rust: add bindgen step as a meson dependency Manos Pitsidianakis
2024-08-23 8:11 ` [PATCH v8 5/8] .gitattributes: add Rust diff and merge attributes Manos Pitsidianakis
2024-08-23 8:11 ` [PATCH v8 6/8] rust: add crate to expose bindings and interfaces Manos Pitsidianakis
2024-08-26 5:03 ` Junjie Mao
2024-08-26 6:12 ` Manos Pitsidianakis
2024-08-26 8:41 ` Junjie Mao
2024-08-26 5:31 ` Junjie Mao
2024-08-26 6:41 ` Manos Pitsidianakis
2024-08-26 7:45 ` Junjie Mao
2024-08-26 8:24 ` Thomas Huth
2024-08-26 11:29 ` Manos Pitsidianakis [this message]
2024-08-23 8:11 ` [PATCH v8 7/8] rust: add utility procedural macro crate Manos Pitsidianakis
2024-08-26 5:15 ` Junjie Mao
2024-08-26 6:02 ` Manos Pitsidianakis
2024-08-23 8:11 ` [PATCH v8 8/8] rust: add PL011 device model Manos Pitsidianakis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=itpbj.iuoq6f0pob1o@linaro.org \
--to=manos.pitsidianakis@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=berrange@redhat.com \
--cc=gustavo.romero@linaro.org \
--cc=junjie.mao@intel.com \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=pierrick.bouvier@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=thuth@redhat.com \
--cc=zhao1.liu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).