Build jemalloc with a larger page size by clockwork-labs-bot · Pull Request #4766 · clockworklabs/SpacetimeDB
Summary
- build vendored jemalloc with
JEMALLOC_SYS_WITH_LG_PAGE=16 - keep jemalloc enabled instead of falling back to the system allocator
- preserve existing jemalloc metrics and profiling support
Context
Users on Linux/aarch64 can hit an immediate abort before any CLI work starts:
<jemalloc>: Unsupported system page size
memory allocation of 4 bytes failed
Aborted (core dumped)
The reported reproducer was spacetime login on Fedora Asahi Remix 42 on Apple Silicon, but the crash happens during allocator init, so it is not specific to login.
This switches from the earlier allocator fallback approach to the narrower fix John requested: build jemalloc with a larger configured page size.
Caveat
Cargo does not support target-specific [env] config, so the repo-level fix uses workspace cargo config and applies to any local build of vendored jemalloc from this repo, not only Linux/aarch64.
Testing
cargo check -p spacetimedb-cli -p spacetimedb-standalone -p spacetimedb-client-api