3 ms·
Rust has used jemalloc for a long time (since Rust 0.8, I think). The new feature is the ability to configure it to use the system allocator instead. But which
by mbrubeck 11y ago
Rust has used jemalloc for a long time (since Rust 0.8, I think). The new feature is the ability to configure it to use the system allocator instead.
But whichever malloc implementation it uses, it still relies on the kernel. For example, jemalloc uses the operating system to map memory, by calling library functions like VirtualAlloc (win32) or mmap (POSIX).
https://github.com/jemalloc/jemalloc/blob/3a92319ddc5610b755f755cbbbd12791ca9d0c3d/src/pages.c https://github.com/jemalloc/jemalloc/blob/3a92319ddc5610b755...