Skip to content
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

netlist: fix aligned_alloc (PR #9801) #9813

Merged
merged 1 commit into from
May 23, 2022
Merged

Conversation

couriersud
Copy link
Contributor

No description provided.

@ajrhacker ajrhacker merged commit 281ee90 into mamedev:master May 23, 2022
@cuavas
Copy link
Member

cuavas commented May 23, 2022

Note that as of C++17 you can use one of the overloads of operator new for aligned allocation: https://en.cppreference.com/w/cpp/memory/new/operator_new

The disadvantage is that you also need to pass the same alignment value to operator delete when you release the memory.

@couriersud couriersud deleted the fbalign branch May 23, 2022 08:44
@couriersud
Copy link
Contributor Author

Thanks a lot. I will try to use this going forward. A lot less macro madness.

@cuavas
Copy link
Member

cuavas commented May 26, 2022

Thanks a lot. I will try to use this going forward. A lot less macro madness.

There’s exactly one case of it being used (that I know of) in src/lib/util so far:

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.

3 participants