Update mimalloc, enable for glibc Linux aarch64, explicitly disable for wasm and musl (#8462)
# Description
- **Update mimalloc** dependency.
- **Enable mimalloc for Linux on aarch64 with glibc:** it seems to work
just fine!
- **Disable mimalloc for wasm and musl.** Mimalloc is already disabled
for these platforms in next-swc, but I want to centralize these platform
checks:
https://github.com/vercel/next.js/blob/73918c6711b538678dd66303fdbd61bfd10b288c/packages/next-swc/crates/napi/src/lib.rs#L71
- **Reduce duplicate code across platforms.** The two implementations of
`TurboMalloc` were identical, aside from the base allocator used. Move
the compile-time branch into an inlined function.
**Related Next.JS PR:** https://github.com/vercel/next.js/pull/66815
# Testing
## On glibc Linux aarch64
```
pnpm pack-next
```
Install into a test project and try running the development server.
## Other platforms
I have not tested other platforms, and will rely on CI for those (here
and in https://github.com/vercel/next.js/pull/66815)