Skip to content

Reintroduce jemalloc #11807

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

Closed
brson opened this issue Jan 26, 2014 · 2 comments · Fixed by #14006
Closed

Reintroduce jemalloc #11807

brson opened this issue Jan 26, 2014 · 2 comments · Fixed by #14006
Labels
A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows

Comments

@brson
Copy link
Contributor

brson commented Jan 26, 2014

It would still be great to have our own, awesome allocator. I'd suggest building jemalloc in the mode where it doesn't attempt to replace the malloc and free functions but instead provides them under their own name, and modify std to use jemalloc directly.

@huonw
Copy link
Member

huonw commented Jan 26, 2014

Won't using different symbol names interfere with LLVM's libcall optimisations? (Of course, the net benefit of using jemalloc might still be positive.)

@brson
Copy link
Contributor Author

brson commented Jan 26, 2014

@huonw Maybe, but if so we can fix llvm.

bors added a commit to rust-lang-ci/rust that referenced this issue Dec 1, 2023
[`redundant_guards`]: catch `is_empty`, `starts_with` and `ends_with` on slices and `str`s

Fixes rust-lang#11807

Few things worth mentioning:
- Taking `snippet`s is now done at callsite, instead of passing a span and doing it in `emit_redundant_guards`. This is because we now need custom suggestion strings in certain places, like `""` for `str::is_empty`.
- This now uses `snippet` instead of `snippet_with_applicability`. I don't think this really makes any difference for `MaybeIncorrect`, though?
- This could also lint byte strings, as they're of type `&[u8; N]`, but that can be ugly so I decided to leave it out for now

changelog: [`redundant_guards`]: catch `str::is_empty`, `slice::is_empty`, `slice::starts_with` and `slice::ends_with`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants