On this page
max_align_t
Prev: offsetof | Up: stddef.h | Next: stdbool.h
Rel: stddef.h, stdint, stdbool & limits Guide
Ref: cppreference — max_align_t
Tags: #public #prog #c #stdlib #stddef #tier/specialized
Include
#include <stddef.h>
Signature & Overview
typedef /* scalar/struct */ max_align_t;
Type whose alignment is at least as strict as every fundamental type (C11).
Notes & Pitfalls
- Strictest fundamental alignment on the platform (usually 16 bytes): Use
_Alignof(max_align_t)when aligning generic heap/arena allocator blocks.
Example
#include <assert.h>
#include <stddef.h>
int main(void) { assert(_Alignof(max_align_t) >= _Alignof(double)); }
Linked from
Related notes
- tuts/c/stdlib/stddef/offsetof Linked here; links to this page; shared tags: #c, #prog, #stddef, #stdlib, #tier
- tuts/c/stdlib/stddef Linked here; links to this page; shared tags: #c, #prog, #stddef, #stdlib
- tuts/c/stdlib/stdbool Linked here; shared tags: #c, #prog, #stdlib
- tuts/c/stdlib/stdint_stdbool_and_limits Linked here; shared tags: #c, #prog, #stdlib
- tuts/c/stdlib/stddef/NULL shared tags: #c, #prog, #stddef, #stdlib, #tier
- tuts/c/stdlib/stddef/ptrdiff_t shared tags: #c, #prog, #stddef, #stdlib, #tier
- tuts/c/stdlib/stddef/size_t shared tags: #c, #prog, #stddef, #stdlib, #tier
- tuts/c/stdlib/assert/assert shared tags: #c, #prog, #stdlib, #tier
- tuts/c/stdlib/assert/static_assert shared tags: #c, #prog, #stdlib, #tier
- tuts/c/stdlib/ctype/isalpha shared tags: #c, #prog, #stdlib, #tier