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

Avoid memory explosion when stress testing bindgen #3496

Merged
merged 1 commit into from
Feb 19, 2025
Merged

Conversation

kennykerr
Copy link
Collaborator

The windows-bindgen crate's bindgen method is meant to be called once per build but during stress testing, it can be called numerous times from the same process leading to an explosion of memory usage. The winmd reader does an awkward dance with the winmd files to avoid a complex lifetime model. I hope to improve this over time but at least with this change the internal lifetime of the reader and files are scoped to the bindgen function call and thus greatly reduces memory usage during build validation.

@kennykerr kennykerr merged commit ce59d85 into master Feb 19, 2025
90 checks passed
@kennykerr kennykerr deleted the box-reader branch February 19, 2025 15:48
@riverar
Copy link
Collaborator

riverar commented Feb 19, 2025

Thanks!

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.

2 participants