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```
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$```
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.