https://github.com/jj-vcs/jj/pull/9610

Index: cli/src/main.rs
--- cli/src/main.rs.orig
+++ cli/src/main.rs
@@ -12,8 +12,14 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-// disable for windows on aarch64 due to test failures
-#[cfg(not(all(target_os = "windows", target_arch = "aarch64")))]
+// mimalloc only enabled on configurations that are validated to work in CI
+#[cfg(any(
+    all(target_os = "windows", target_arch = "x86_64"),
+    all(target_os = "macos", target_arch = "x86_64"),
+    all(target_os = "macos", target_arch = "aarch64"),
+    all(target_os = "linux", target_arch = "x86_64"),
+    all(target_os = "linux", target_arch = "aarch64"),
+))]
 #[global_allocator]
 static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
 
