HomeFreeBSD

Use UMA_ALIGN_PTR instead of sizeof(void *) for zone alignment.

Description

Use UMA_ALIGN_PTR instead of sizeof(void *) for zone alignment.

uma_zcreate()'s alignment argument is supposed to be sizeof(foo) - 1,
and uma.h provides a set of helper macros for common types. Passing
sizeof(void *) results in all of the members being misaligned triggering
unaligned access faults on certain architectures (notably MIPS).

Reported by: brooks
Obtained from: CheriBSD
MFC after: 3 days
Sponsored by: DARPA / AFRL

Details

Provenance
jhbAuthored on
Parents
rS315322: syslogd: fix memory leaks in main(..) and allowaddr(..)
Branches
Unknown
Tags
Unknown