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

Replace AlignedBoxedSlice with aligned_vec::ABox #3371

Merged
merged 1 commit into from
Apr 2, 2024

Conversation

FreezyLemon
Copy link
Contributor

@FreezyLemon FreezyLemon commented Mar 29, 2024

Closes #3370.

ABox<[T]> generally works the same way as AlignedBoxedSlice<T>, but uses a different alignment by default:

AlignedBoxedSlice: 8 on wasm, 64 everywhere else
ABox: Generally two cachelines, 64 bytes for unknown archs (exact rules)

I am pretty sure the wasm allocation bug mentioned in the code comment has been fixed, so using a higher alignment should be fine on the wasm32 arch.

It's possible to configure aligned_vec to reproduce the old behaviour exactly, but I think it's probably better to stick to the crate defaults.

Copy link

codecov bot commented Mar 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.69%. Comparing base (3c3a26f) to head (66e15b9).
Report is 13 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3371      +/-   ##
==========================================
+ Coverage   88.52%   88.69%   +0.16%     
==========================================
  Files          89       89              
  Lines       28323    27760     -563     
==========================================
- Hits        25074    24622     -452     
+ Misses       3249     3138     -111     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@barrbrain barrbrain left a comment

Choose a reason for hiding this comment

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

The aligned_vec crate doesn't appear to be popular enough to have made its way into distributions yet. As it is a transitive dependency via v_frame, this is no worse than the current state.

@barrbrain barrbrain merged commit 732162e into xiph:master Apr 2, 2024
27 checks passed
@FreezyLemon FreezyLemon deleted the remove-alignedboxedslice branch April 2, 2024 17:17
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.

AlignedBoxedSlice is unsound
2 participants