Page MenuHomeFreeBSD

netlink: Align allocations on __max_align_t, not uint64_t.
ClosedPublic

Authored by jhb on Aug 3 2023, 5:32 PM.
Tags
None
Referenced Files
F102989895: D41301.diff
Tue, Nov 19, 1:26 PM
Unknown Object (File)
Sat, Nov 16, 8:19 PM
Unknown Object (File)
Fri, Nov 15, 9:01 AM
Unknown Object (File)
Tue, Oct 22, 1:45 PM
Unknown Object (File)
Oct 17 2024, 12:42 AM
Unknown Object (File)
Oct 15 2024, 12:16 PM
Unknown Object (File)
Oct 13 2024, 10:24 AM
Unknown Object (File)
Oct 12 2024, 9:21 AM
Subscribers

Details

Summary

uint64_t is not sufficient alignment for allocators on all platforms.
On a CHERI platform pointers require 16 byte alignment, but also if a
type contained a uint128_t or long double it would not be aligned
correctly either. C11 added max_align_t precisely to provide a
portable type for allocators to use.

Obtained from: CheriBSD
Sponsored by: DARPA

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable