How to remove tcmalloc error on aarch64

While trying to run mojo on aarch64 gives the following error, and for me its not possible to install server edition of Ubuntu with 48bit memory address space.

17555 external/tcmalloc+/tcmalloc/system-alloc.h:575] MmapAligned() failed - unable to allocate with tag (hint=0x6fb4c0000000, size=1073741824, alignment=1073741824) - is something limiting address placement? 17555 external/tcmalloc+/tcmalloc/system-alloc.h:582] Note: the allocation may have failed because TCMalloc assumes a 48-bit virtual address space size; you may need to rebuild TCMalloc with TCMALLOC_ADDRESS_BITS defined to your system's virtual address space size
17555 external/tcmalloc+/tcmalloc/arena.cc:59] CHECK in Alloc: FATAL ERROR: Out of memory trying to allocate internal tcmalloc data (bytes=131072, object-size=16384); is something preventing mmap from succeeding (sandbox, VSS limitations)?
Aborted```

What command are you running that leads to this error message?

I installed mojo using pixi

cd hello-world

pixi shell

mojo –-version

userland@localhost:~/hello-world$ pixi shell

(hello-world) userland@localhost:~/hello-world$ mojo --version
31096 external/tcmalloc+/tcmalloc/system-alloc.h:575] MmapAligned() failed - unable to allocate with tag (hint=0x4f3000000000, size=1073741824, alignment=1073741824) - is something limiting address placement?
31096 external/tcmalloc+/tcmalloc/system-alloc.h:582] Note: the allocation may have failed because TCMalloc assumes a 48-bit virtual address space size; you may need to rebuild TCMalloc with TCMALLOC_ADDRESS_BITS defined to your system's virtual address space size
31096 external/tcmalloc+/tcmalloc/arena.cc:59] CHECK in Alloc: FATAL ERROR: Out of memory trying to allocate internal tcmalloc data (bytes=131072, object-size=16384); is something preventing mmap from succeeding (sandbox, VSS limitations)?
Aborted
(hello-world) userland@localhost:~/hello-world$```

Thanks, and what machine/OS are you running on?

System
------------
       Pixi version: 0.54.2
           Platform: linux-aarch64
   Virtual packages: __unix=0=0
                   : __linux=5.10.218=0
                   : __glibc=2.35=0
                   : __archspec=1=cortex_a72
          Cache dir: /home/userland/.cache/rattler/cache
       Auth storage: /home/userland/.rattler/credentials.json
   Config locations: No config files found

Global
------------
            Bin dir: /home/userland/.pixi/bin
    Environment dir: /home/userland/.pixi/envs
       Manifest dir: /home/userland/.pixi/manifests/pixi-global.toml

Workspace
------------
               Name: hello-world
            Version: 0.1.0
      Manifest file: /home/userland/hello-world/pixi.toml
       Last updated: 10-09-2025 04:47:37

Environments
------------
        Environment: default
           Features: default
           Channels: https://conda.modular.com/max-nightly, conda-forge
   Dependency count: 1
       Dependencies: mojo
   Target platforms: linux-aarch64
    Prefix location: /home/userland/hello-world/.pixi/envs/default


(hello-world) userland@localhost:~/hello-world$```

Thanks, I’ll see what we can determine and get back to you.

You wouldn’t happen to be on a Raspberry Pi 4, would you?

The Pi 4 has an odd address space size, and as a result tcmalloc doesn’t work in its default configuration.

Hi @joshpeterson I was waiting patiently for past 4 month, since I didn’t get a satisfactory answer I thought to ask again, will tcmalloc be replaced or there will be a bypass mechanism when mojo get open sourced. As mojo is expected to be general purpose and not everyone will be building stuff on a server with 48bit address space.

Sorry for the delay in my response, and thanks for your patience! I lost track of this issue. I expect that when Mojo is open sourced, it will be possible to use a different allocator. At the moment we’re not planning any active work to change this though, so it will need to be a community effort.

In that case I’ll toss this into my list of “things to do after the runtime goes OSS”, since tcmalloc’s “nobody wants overcommit off” attitude is not acceptable for a lot of my applications and the puzzling lack of hugepage support is annoying.

1 Like

Amazing, thank you!