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

Is xml-rs memory leak malloc_trim workaround still relevant? #62

Open
JamiKettunen opened this issue May 7, 2024 · 3 comments
Open

Comments

@JamiKettunen
Copy link

https://github.com/pop-os/cosmic-store/blob/1e1b322/src/backend/mod.rs#L91-L99

Doesn't build if host system is using e.g. https://musl.libc.org:

   Compiling cosmic-store v0.1.0 (.../cosmic-epoch/cosmic-store)
error[E0425]: cannot find function `malloc_trim` in crate `libc`
  --> src/backend/mod.rs:95:19
   |
95 |             libc::malloc_trim(0);
   |                   ^^^^^^^^^^^ not found in `libc`

For more information about this error, try `rustc --explain E0425`.
error: could not compile `cosmic-store` (bin "cosmic-store") due to 1 previous error
error: Recipe `build-debug` failed on line 41 with exit code 101
error: Recipe `build` failed on line 23 with exit code 101
@jackpot51
Copy link
Member

It is still relevant. You could wrap it in a feature.

@JamiKettunen
Copy link
Author

I don't see anything in https://github.com/kornelski/xml-rs/issues, shouldn't this be reported to upstream with a reproducer so eventually malloc_trim could be dropped from here entirely?

@mmstick
Copy link
Member

mmstick commented May 7, 2024

It's a behavior of glibc malloc rather than an issue with xml-rs

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

3 participants