not sure if it would make a difference, but I noticed that in bolt's dockerfile they're linking llvm against jemalloc.
https://github.com/llvm/llvm-project/blob/main/bolt/utils/docker/Dockerfile#L23
That might be interesting to try, perhaps if any of the memory allocations are showing up in profiles of kernel builds. I guess we're using whatever malloc implementation musl has? I wonder if it has its own? "mallocng?" https://git.musl-libc.org/cgit/musl/tree/src/malloc/mallocng/malloc.c
not sure if it would make a difference, but I noticed that in bolt's dockerfile they're linking llvm against jemalloc.
https://github.com/llvm/llvm-project/blob/main/bolt/utils/docker/Dockerfile#L23
That might be interesting to try, perhaps if any of the memory allocations are showing up in profiles of kernel builds. I guess we're using whatever malloc implementation musl has? I wonder if it has its own? "mallocng?" https://git.musl-libc.org/cgit/musl/tree/src/malloc/mallocng/malloc.c