[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d00561e2-145f-42e0-8fb2-5ca3556afac8@cs.ucla.edu>
Date: Sat, 8 Feb 2025 12:09:40 -0800
From: Paul Eggert <eggert@...ucla.edu>
To: Alejandro Colomar <alx@...nel.org>
Cc: DJ Delorie <dj@...hat.com>, Eric Blake <eblake@...hat.com>,
Will Newton <will.newton@...aro.org>, linux-man@...r.kernel.org,
Danilo Krummrich <dakr@...nel.org>, Tamir Duberstein <tamird@...il.com>,
Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...il.com>,
Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <benno.lossin@...ton.me>,
Andreas Hindborg <a.hindborg@...nel.org>, Alice Ryhl <aliceryhl@...gle.com>,
Trevor Gross <tmgross@...ch.edu>, rust-for-linux@...r.kernel.org,
linux-kernel@...r.kernel.org, Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
Subject: Re: [PATCH v2] rust: alloc: satisfy `aligned_alloc` requirements
On 2025-02-08 11:19, Alejandro Colomar wrote:
> I wonder why glibc silently overaligns aligned_alloc() without reporting
> an error for an alignment of 2, while it reports an error for an
> alignment of 3. It doesn't make much sense at first glance.
Why doesn't it make sense?
If the underlying memory management system supports only some
power-of-two alignments including one alignment greater than 2, it is
easy to support alignment of 2 by overaligning, but it is not possible
to support an alignment of 3.
Powered by blists - more mailing lists