Skip to content

Revert "runtime: allow over-aligned types in the runtime" #58499

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 5, 2022

Conversation

grynspan
Copy link
Contributor

@grynspan grynspan commented Apr 28, 2022

swift::aligned_alloc (and friends) was added as a workaround for 32-bit platforms' operator new under-aligning allocations, but this was later corrected more cleanly by including <new> for placement new and by using swift_cxx_newObject() to rely on swift_slowAlloc() for allocations instead of operator new. The commit that added swift::aligned_alloc can be removed now.

This change reverts commit b694ce4.

Resolves #58498.

@grynspan grynspan self-assigned this Apr 28, 2022
@grynspan
Copy link
Contributor Author

@swift-ci please test

Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable to me however, the commit message could use a bit of tweaking - it was a fix for non-alignment aware operator new (on <C++17) for non-Darwin 32-bit platforms, not specifically Windows.

@grynspan
Copy link
Contributor Author

Seems reasonable to me however, the commit message could use a bit of tweaking - it was a fix for non-alignment aware operator new (on <C++17) for non-Darwin 32-bit platforms, not specifically Windows.

FWIW the commit message is just:

Revert "runtime: allow over-aligned types in the runtime"

But I'll amend the PR description to clarify.

@grynspan
Copy link
Contributor Author

grynspan commented May 5, 2022

Just need to fix up Heap.h, then I can merge.

@grynspan grynspan force-pushed the jgrynspan/58498-remove-aligned_alloc-template branch 2 times, most recently from 3ecb165 to 05aee0b Compare May 5, 2022 15:02
@grynspan grynspan force-pushed the jgrynspan/58498-remove-aligned_alloc-template branch from 05aee0b to b749dd3 Compare May 5, 2022 15:10
@grynspan
Copy link
Contributor Author

grynspan commented May 5, 2022

@swift-ci please smoke test

@grynspan grynspan merged commit c1554f6 into main May 5, 2022
@grynspan grynspan deleted the jgrynspan/58498-remove-aligned_alloc-template branch May 5, 2022 17:12
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.

aligned_alloc is no longer required and can be removed
4 participants