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

Add mallinfo2 support #2228

Merged
merged 2 commits into from Jun 10, 2021
Merged

Add mallinfo2 support #2228

merged 2 commits into from Jun 10, 2021

Conversation

jonas-schievink
Copy link
Contributor

This function was added in glibc 2.33 and fixes a shortcoming of the mallinfo API: it was unable to handle memory usage of more than 2 GB due to its use of int as the field types. This was fixed by duplicating the API and changing them to size_t.

@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @JohnTitor (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@JohnTitor
Copy link
Member

Looks good! @bors r+

@bors
Copy link
Contributor

bors commented Jun 10, 2021

📌 Commit 7f6ce32 has been approved by JohnTitor

@bors
Copy link
Contributor

bors commented Jun 10, 2021

⌛ Testing commit 7f6ce32 with merge dac89a3...

@bors
Copy link
Contributor

bors commented Jun 10, 2021

☀️ Test successful - checks-actions, checks-cirrus-freebsd-11, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13
Approved by: JohnTitor
Pushing dac89a3 to master...

@bors bors merged commit dac89a3 into rust-lang:master Jun 10, 2021
@jonas-schievink jonas-schievink deleted the mallinfo2 branch June 10, 2021 17:31
bors added a commit that referenced this pull request Jun 11, 2021
Bump version to 0.2.97

I'd like to get a new release published, since I want to make use of #2228 in rust-lang/rust-analyzer#9204
bors bot added a commit to rust-lang/rust-analyzer that referenced this pull request Jun 11, 2021
9204: feat: more accurate memory usage info on glibc Linux r=jonas-schievink a=jonas-schievink

This adds support for the new `mallinfo2` API added in glibc 2.33. It addresses a shortcoming in the `mallinfo` API where it was unable to handle memory usage of more than 2 GB, which we sometimes exceed.

Blocked on rust-lang/libc#2228

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants