Skip to content

Avoid memory explosion when stress testing bindgen#3496

Merged
kennykerr merged 1 commit intomasterfrom
box-reader
Feb 19, 2025
Merged

Avoid memory explosion when stress testing bindgen#3496
kennykerr merged 1 commit intomasterfrom
box-reader

Conversation

@kennykerr
Copy link
Copy Markdown
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
Copy Markdown
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