-
Notifications
You must be signed in to change notification settings - Fork 1k
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
android: add mallinfo2 #3940
base: main
Are you sure you want to change the base?
android: add mallinfo2 #3940
Conversation
It's actually just mallinfo in a funny hat, just like in C; see <https://android-review.googlesource.com/c/platform/bionic/+/1910571> for the review of when they added this to Bionic's malloc.h header. Since it's actually just mallinfo in dsguise, there is no minimum SDK level (just like for mallinfo). Unlike in the header, I had to copy and paste the struct, because that's easier than building/borrowing a Rust macro to duplicate the fields. (Sometimes worse really is better.)
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @tgross35 (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
Hmm, I was really hoping there was Android CI because there are a lot of funny little failures when I run "cargo test" on my phone (and that's after skipping the tests for sem_open/sem_close/sem_unlink that Termux Lucky for me, it looks like more checks materialized while I was writing this comment. Well, the dynamic linker looks a bit grouchy, but the tests themselves appear to pass. See e.g.
No clue why the dynamic linker on my phone is happy with the same flags ... |
This looks fine to me, @maurer mind double checking? |
Seems fine from an Android POV, that function is indeed available. That said:
|
Labeled waiting on author since the type alias makes sense here as Matthew mentioned (
It would be good to confirm that this is actually useful as well (easy enough if you are supporting an old API). |
@SamB could you change this to make use of type aliases? Also confirm that this is for situations where |
☔ The latest upstream changes (presumably #4132) made this pull request unmergeable. Please resolve the merge conflicts. |
It's actually just mallinfo in a funny hat, just like in C; see https://android-review.googlesource.com/c/platform/bionic/+/1910571 for the review of when they added this to Bionic's malloc.h header.
Since it's actually just mallinfo in dsguise, there is no minimum SDK level (just like for mallinfo).
Unlike in the header, I had to copy and paste the struct, because that's easier than building/borrowing a Rust macro to duplicate the fields. (Sometimes worse really is better.)