Enable larger page size in jemalloc

Fixes #850
pull/879/head
Wilfred Hughes 2025-09-22 20:25:01 +07:00
parent dc4ce18196
commit b68e1dd673
2 changed files with 11 additions and 0 deletions

@ -2,6 +2,9 @@
### Build
Incrased the default page size of Jemalloc, so difftastic should work
on systems with large page sizes (typically aarch64, i.e. Arm).
difftastic now requires Rust 1.75 to build.
### Parsing

@ -220,6 +220,14 @@ fn main() {
if let Some((version, _, _)) = rustc::triple() {
println!("cargo:rustc-env=DFT_RUSTC_VERSION={}", version);
}
// Use 64-KiB pages with jemalloc. This solves "<jemalloc>:
// Unsupported system page size" errors, and performs the same as
// jemalloc's default settings.
//
// Note that difftastic does not use jemalloc on all operating
// systems, but it's harmless to set this unconditionally.
println!("cargo:rustc-env=JEMALLOC_SYS_WITH_LG_PAGE=16");
}
fn commit_info() {