RFR: JDK-8303817: Add constexpr for natural malloc alignment

Quan Anh Mai qamai at openjdk.org
Wed Mar 8 14:21:54 UTC 2023


On Wed, 8 Mar 2023 11:23:53 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> I miss having an easy way to get the alignment the libc guarantees for malloc. Let's add this, and we can use this right away with NMT's MallocHeader.
> 
> Tests: manually built and tested x64 linux (clang + GCC) and x86 linux.

Can we use `alignof(std::max_align_t)` instead? Thanks.

-------------

PR: https://git.openjdk.org/jdk/pull/12921


More information about the hotspot-dev mailing list