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

Use Rust rather than C allocator #9

Open
SpaceManiac opened this issue May 16, 2017 · 0 comments
Open

Use Rust rather than C allocator #9

SpaceManiac opened this issue May 16, 2017 · 0 comments

Comments

@SpaceManiac
Copy link
Owner

Opus offers x_get_size and x_init functions that can be used to use an allocator other than C's malloc. Because this binding is intended for use by Rust hosts, using Rust's allocator is preferred over letting C malloc, when feasible.

Biggest caveat: C malloc has byzantine alignment guarantees, stricter on some platforms than Vec<usize> allows. Probably opus won't require greater than usize alignment, but it's better to be on the safe side.

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

No branches or pull requests

1 participant