Re: [PATCH v2] rust: alloc: satisfy `aligned_alloc` requirements

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

 



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.




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux