Skip to content
Myr

Disable jemalloc on Android (fixes #636 and #642)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Disabling jemalloc for Android fixes a build failure since jemalloc does not build out of the box for that platform on older API versions. Android started using jemalloc as the system allocator around 2014 for most devices. In the latest Android version (11) the system allocator has been switched to Scudo, which while not being jemalloc is modern and actively maintained and should be used for most software on Android. See: - https://android-developers.googleblog.com/2020/06/system-hardening-in-android-11.html - https://blog.nsogroup.com/a-tale-of-two-mallocs-on-android-libc-allocators-part-2-jemalloc/ - https://stackoverflow.com/questions/2266762/android-libc-version-and-malloc-implementation

authored by Fredrik Fornwall · committed by David Peter · parent f064e41 · Browse files · 3 files+5 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+5 added−2 removed

  • other:+5 added−2 removed

3 files+5 added−2 removed

modified:src/main.rs+1 added-1 removed
32 unmodified lines
33use crate::regex_helper::pattern_has_uppercase_char;3435// We use jemalloc for performance reasons, see https://github.com/sharkdp/fd/pull/48136// FIXME: re-enable jemalloc on macOS, see comment in Cargo.toml file for more infos37#[cfg(all(not(windows), not(target_os = "macos"), not(target_env = "musl")))]37#[cfg(all(not(windows), not(target_os = "android"), not(target_os = "macos"), not(target_env = "musl")))]38#[global_allocator]39static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;4041fn run() -> Result<ExitCode> {
390 unmodified lines
modified:Cargo.toml+1 added-1 removed
modified:CHANGELOG.md+3 added
3 unmodified lines
45- Improved the usability of the time-based options, see #624 and #645 (@gorogoroumaru)67## Bugfixes89- Disable jemalloc on Android, see #6621011## Changes12## Other1314- Added `zsh` completion files, see #654 and #189 (@smancill)
475 unmodified lines