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
F97993365: D41301.diff
Tue, Oct 1, 11:17 PM
Unknown Object (File)
Mon, Sep 30, 4:48 AM
Unknown Object (File)
Fri, Sep 27, 10:24 PM
Unknown Object (File)
Wed, Sep 4, 5:06 AM
Unknown Object (File)
Aug 30 2024, 1:38 PM
Unknown Object (File)
Aug 30 2024, 1:38 PM
Unknown Object (File)
Aug 30 2024, 1:38 PM
Unknown Object (File)
Aug 30 2024, 1:24 PM
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