Skip to content

src/common/memory_allocator: align PageHeader explicitly - #46

Merged
illwieckz merged 1 commit into
masterfrom
illwieckz/alignment
Oct 15, 2026
Merged

illwieckz merged 1 commit into
masterfrom
illwieckz/alignment

Conversation

@illwieckz

@illwieckz illwieckz commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Align PageHeader to std::max_align_t to ensure the memory following the header is properly aligned on 32-bit targets.

This fixes that static assertion failure when building with i686-linux-gnu-gcc:

error: static assertion failed:
 The first byte after `PageHeader` must be properly aligned.

Align PageHeader to std::max_align_t to ensure the memory
following the header is properly aligned on 32-bit targets.

This fixes that static assertion failure when building with
i686-linux-gnu-gcc:

error: static assertion failed:
 The first byte after `PageHeader` must be properly aligned.
@illwieckz

Copy link
Copy Markdown
Member Author

I caught it when building our current Dæmon engine master with our Unvanquished release scripts.

@illwieckz

Copy link
Copy Markdown
Member Author

@DolceTriade Thank you for the review.

@illwieckz
illwieckz merged commit ca74412 into master Oct 15, 2026
@illwieckz
illwieckz deleted the illwieckz/alignment branch October 15, 2026 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants