{"slug": "mimalloc", "name": "mimalloc", "category": "dev-libs", "category_name": "Libraries and frameworks", "description": "Compact general-purpose memory allocator from Microsoft, usable as a drop-in malloc replacement.", "recommenders": 5, "commenters": 5, "warners": 0, "score": 4.828, "rising": 3.35, "first": "2026-06-20", "latest": "2026-10-29", "why": "Recommended for allocation speed close to a bump allocator, for keeping memory use stable under heavy load, and as a drop-in swap for musl's default malloc.", "why_is_quote": false, "has_verdict": true, "sentiment": {"recommend": 5, "neutral": 0, "compare": 0, "warn": 0}, "spark": [0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 2], "listed": true, "loved": ["Performance", "Musl malloc replacement"], "caveat": "", "short_quote": "we swap out the default malloc with mimalloc for high performance because why would you not?", "icon": true, "domain": null, "github_repo": "github.com/microsoft/mimalloc", "official_url": "https://github.com/microsoft/mimalloc", "pricing": "open source", "aliases": ["mimalloc"], "verdict": [{"text": "Recommended for allocation speed close to a bump allocator", "cites": [{"id": 804705856, "item_id": 50294116, "url": "https://news.ycombinator.com/item?id=50294116", "by": "vatsachak", "date": "2026-10-29", "stance": "recommend", "quote": "I found that mimalloc does just as good as bumpalo (within 5%)", "excerpt": "I've been writing Rust for a year and change professionally, also as a hobby, and even though I love it, it's really annoying to choose the allocation model and lifetime model at every step. For example, - A field in a struct cannot borrow another field so now you'd have to create two structs. I guess you could write an impl to borrow that field instead of storing the borrow. - In simulation software I wrote I found ", "context": "writes Rust professionally and as a hobby", "use_case": "memory allocation in simulation software", "switched_from": "", "story": "noalloc: Tooling and libraries to enforce zero heap allocations in Golang"}, {"id": 791768624, "item_id": 49485539, "url": "https://news.ycombinator.com/item?id=49485539", "by": "lrvick", "date": "2026-08-28", "stance": "recommend", "quote": "we swap out the default malloc with mimalloc for high performance because why would you not?", "excerpt": "I really find complaints about the minimum viable placeholder malloc in musl confusing. Does anyone seriously try to use malloc-ng for performance critical use cases? Our entire linux distro is musl based BUT we swap out the default malloc with mimalloc for high performance because why would you not? Best of both worlds. https://codeberg.org/stagex/stagex/src/branch/main/packages/core/musl/Containerfile#L54", "context": "runs a musl-based Linux distro", "use_case": "high-performance malloc on musl", "switched_from": "", "story": "Don't use musl if you care about performance"}]}, {"text": ", for keeping memory use stable under heavy load", "cites": [{"id": 804344192, "item_id": 50271512, "url": "https://news.ycombinator.com/item?id=50271512", "by": "elendilm", "date": "2026-10-28", "stance": "recommend", "quote": "Dip's memory, using mimalloc, stabilizes at ~60 MB post request completion no matter how many requests you throw at it.", "excerpt": "I first encountered this behaviour on Linux desktop with Qt QML apps as far back as 2015. For a long time, I thought it was Qt QML ListView's inefficiency and didn't think much of it. But in recent years, the phenomenon was visible with Dip which was built on rust. Dip does massive parallel fanout using green threads ('may' coroutines) with work being NUMA pinned (software hash) using a thread per core model. A defau", "context": "", "use_case": "fixing memory growth in desktop executable", "switched_from": "default allocator", "story": "Four Months of Zig"}]}, {"text": ", and as a drop-in swap for musl's default malloc.", "cites": [{"id": 791768624, "item_id": 49485539, "url": "https://news.ycombinator.com/item?id=49485539", "by": "lrvick", "date": "2026-08-28", "stance": "recommend", "quote": "we swap out the default malloc with mimalloc for high performance because why would you not?", "excerpt": "I really find complaints about the minimum viable placeholder malloc in musl confusing. Does anyone seriously try to use malloc-ng for performance critical use cases? Our entire linux distro is musl based BUT we swap out the default malloc with mimalloc for high performance because why would you not? Best of both worlds. https://codeberg.org/stagex/stagex/src/branch/main/packages/core/musl/Containerfile#L54", "context": "runs a musl-based Linux distro", "use_case": "high-performance malloc on musl", "switched_from": "", "story": "Don't use musl if you care about performance"}, {"id": 786213089, "item_id": 49138318, "url": "https://news.ycombinator.com/item?id=49138318", "by": "lrvick", "date": "2026-08-01", "stance": "recommend", "quote": "We use musl+mimalloc by default for our entire production operating systems", "excerpt": "We use musl+mimalloc by default for our entire production operating systems: https://stagex.tools", "context": "builds production operating systems", "use_case": "memory allocator replacing musl default", "switched_from": "", "story": "RipGrep musl binaries occasionally segfault during very-large searches"}]}, {"text": " No complaints were raised; it suits Rust services, musl-based production systems and high-performance network code.", "cites": [{"id": 804344192, "item_id": 50271512, "url": "https://news.ycombinator.com/item?id=50271512", "by": "elendilm", "date": "2026-10-28", "stance": "recommend", "quote": "Dip's memory, using mimalloc, stabilizes at ~60 MB post request completion no matter how many requests you throw at it.", "excerpt": "I first encountered this behaviour on Linux desktop with Qt QML apps as far back as 2015. For a long time, I thought it was Qt QML ListView's inefficiency and didn't think much of it. But in recent years, the phenomenon was visible with Dip which was built on rust. Dip does massive parallel fanout using green threads ('may' coroutines) with work being NUMA pinned (software hash) using a thread per core model. A defau", "context": "", "use_case": "fixing memory growth in desktop executable", "switched_from": "default allocator", "story": "Four Months of Zig"}, {"id": 786213089, "item_id": 49138318, "url": "https://news.ycombinator.com/item?id=49138318", "by": "lrvick", "date": "2026-08-01", "stance": "recommend", "quote": "We use musl+mimalloc by default for our entire production operating systems", "excerpt": "We use musl+mimalloc by default for our entire production operating systems: https://stagex.tools", "context": "builds production operating systems", "use_case": "memory allocator replacing musl default", "switched_from": "", "story": "RipGrep musl binaries occasionally segfault during very-large searches"}, {"id": 777831457, "item_id": 48614466, "url": "https://news.ycombinator.com/item?id=48614466", "by": "spliffedr", "date": "2026-06-20", "stance": "recommend", "quote": "it will fit well for a zero-copy and mem aligned reverse proxy", "excerpt": "Take a look at https://github.com/concurrencykit/ck and https://github.com/microsoft/mimalloc, it will fit well for a zero-copy and mem aligned reverse proxy. Also, if you want to add a DDoS protection and more advanced L4 stuff check out https://docs.ebpf.io/ebpf-library/libxdp/libxdp/", "context": "", "use_case": "memory allocator for proxy", "switched_from": "", "story": "Epoll vs. Io_uring in Linux"}]}], "praise": [{"label": "Performance", "summary": "Commenters use it for high performance, matching a bump allocator within 5% in one simulation.", "quotes": [{"id": 804705856, "item_id": 50294116, "url": "https://news.ycombinator.com/item?id=50294116", "by": "vatsachak", "date": "2026-10-29", "stance": "recommend", "quote": "I found that mimalloc does just as good as bumpalo (within 5%)", "excerpt": "I've been writing Rust for a year and change professionally, also as a hobby, and even though I love it, it's really annoying to choose the allocation model and lifetime model at every step. For example, - A field in a struct cannot borrow another field so now you'd have to create two structs. I guess you could write an impl to borrow that field instead of storing the borrow. - In simulation software I wrote I found ", "context": "writes Rust professionally and as a hobby", "use_case": "memory allocation in simulation software", "switched_from": "", "story": "noalloc: Tooling and libraries to enforce zero heap allocations in Golang"}, {"id": 791768624, "item_id": 49485539, "url": "https://news.ycombinator.com/item?id=49485539", "by": "lrvick", "date": "2026-08-28", "stance": "recommend", "quote": "we swap out the default malloc with mimalloc for high performance because why would you not?", "excerpt": "I really find complaints about the minimum viable placeholder malloc in musl confusing. Does anyone seriously try to use malloc-ng for performance critical use cases? Our entire linux distro is musl based BUT we swap out the default malloc with mimalloc for high performance because why would you not? Best of both worlds. https://codeberg.org/stagex/stagex/src/branch/main/packages/core/musl/Containerfile#L54", "context": "runs a musl-based Linux distro", "use_case": "high-performance malloc on musl", "switched_from": "", "story": "Don't use musl if you care about performance"}, {"id": 777831457, "item_id": 48614466, "url": "https://news.ycombinator.com/item?id=48614466", "by": "spliffedr", "date": "2026-06-20", "stance": "recommend", "quote": "it will fit well for a zero-copy and mem aligned reverse proxy", "excerpt": "Take a look at https://github.com/concurrencykit/ck and https://github.com/microsoft/mimalloc, it will fit well for a zero-copy and mem aligned reverse proxy. Also, if you want to add a DDoS protection and more advanced L4 stuff check out https://docs.ebpf.io/ebpf-library/libxdp/libxdp/", "context": "", "use_case": "memory allocator for proxy", "switched_from": "", "story": "Epoll vs. Io_uring in Linux"}]}, {"label": "Musl malloc replacement", "summary": "Swapped in for musl's default malloc across entire production Linux distros.", "quotes": [{"id": 791768624, "item_id": 49485539, "url": "https://news.ycombinator.com/item?id=49485539", "by": "lrvick", "date": "2026-08-28", "stance": "recommend", "quote": "we swap out the default malloc with mimalloc for high performance because why would you not?", "excerpt": "I really find complaints about the minimum viable placeholder malloc in musl confusing. Does anyone seriously try to use malloc-ng for performance critical use cases? Our entire linux distro is musl based BUT we swap out the default malloc with mimalloc for high performance because why would you not? Best of both worlds. https://codeberg.org/stagex/stagex/src/branch/main/packages/core/musl/Containerfile#L54", "context": "runs a musl-based Linux distro", "use_case": "high-performance malloc on musl", "switched_from": "", "story": "Don't use musl if you care about performance"}, {"id": 786213089, "item_id": 49138318, "url": "https://news.ycombinator.com/item?id=49138318", "by": "lrvick", "date": "2026-08-01", "stance": "recommend", "quote": "We use musl+mimalloc by default for our entire production operating systems", "excerpt": "We use musl+mimalloc by default for our entire production operating systems: https://stagex.tools", "context": "builds production operating systems", "use_case": "memory allocator replacing musl default", "switched_from": "", "story": "RipGrep musl binaries occasionally segfault during very-large searches"}]}, {"label": "Stable memory use", "summary": "One service's memory settled at about 60 MB after requests no matter the load.", "quotes": [{"id": 804344192, "item_id": 50271512, "url": "https://news.ycombinator.com/item?id=50271512", "by": "elendilm", "date": "2026-10-28", "stance": "recommend", "quote": "Dip's memory, using mimalloc, stabilizes at ~60 MB post request completion no matter how many requests you throw at it.", "excerpt": "I first encountered this behaviour on Linux desktop with Qt QML apps as far back as 2015. For a long time, I thought it was Qt QML ListView's inefficiency and didn't think much of it. But in recent years, the phenomenon was visible with Dip which was built on rust. Dip does massive parallel fanout using green threads ('may' coroutines) with work being NUMA pinned (software hash) using a thread per core model. A defau", "context": "", "use_case": "fixing memory growth in desktop executable", "switched_from": "default allocator", "story": "Four Months of Zig"}]}], "caveats": [], "who": [{"by": "vatsachak", "context": "writes Rust professionally and as a hobby", "url": "https://news.ycombinator.com/item?id=50294116", "date": "2026-10-29"}, {"by": "lrvick", "context": "runs a musl-based Linux distro", "url": "https://news.ycombinator.com/item?id=49485539", "date": "2026-08-28"}], "tags": ["for musl-based Linux", "for Rust projects", "for network servers"], "use_cases": ["memory allocation in simulation software", "fixing memory growth in desktop executable", "high-performance malloc on musl", "avoid crashes", "memory allocator replacing musl default", "memory allocator for proxy"], "compared": [{"slug": "jemalloc", "name": "jemalloc", "co": 2, "switched_from": 0, "switched_to": 0}, {"slug": "musl", "name": "musl", "co": 2, "switched_from": 0, "switched_to": 0}], "makers": [], "threads": [{"url": "https://news.ycombinator.com/item?id=50278645", "title": "noalloc: Tooling and libraries to enforce zero heap allocations in Golang", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=50265128", "title": "Four Months of Zig", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=49479826", "title": "Don't use musl if you care about performance", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=49175067", "title": "G\u00f6del, Escher, Elisp: The Beauty of Macros", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=49133889", "title": "RipGrep musl binaries occasionally segfault during very-large searches", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=48613872", "title": "Epoll vs. Io_uring in Linux", "mentions": 1}], "sentiment_by_month": {"2025-11": {}, "2025-12": {}, "2026-01": {}, "2026-02": {}, "2026-03": {}, "2026-04": {}, "2026-05": {}, "2026-06": {"recommend": 1}, "2026-07": {}, "2026-08": {"recommend": 2}, "2026-09": {}, "2026-10": {"recommend": 2}}, "quotes": [{"id": 804705856, "item_id": 50294116, "url": "https://news.ycombinator.com/item?id=50294116", "by": "vatsachak", "date": "2026-10-29", "stance": "recommend", "quote": "I found that mimalloc does just as good as bumpalo (within 5%)", "excerpt": "I've been writing Rust for a year and change professionally, also as a hobby, and even though I love it, it's really annoying to choose the allocation model and lifetime model at every step. For example, - A field in a struct cannot borrow another field so now you'd have to create two structs. I guess you could write an impl to borrow that field instead of storing the borrow. - In simulation software I wrote I found ", "context": "writes Rust professionally and as a hobby", "use_case": "memory allocation in simulation software", "switched_from": "", "story": "noalloc: Tooling and libraries to enforce zero heap allocations in Golang"}, {"id": 804344192, "item_id": 50271512, "url": "https://news.ycombinator.com/item?id=50271512", "by": "elendilm", "date": "2026-10-28", "stance": "recommend", "quote": "Dip's memory, using mimalloc, stabilizes at ~60 MB post request completion no matter how many requests you throw at it.", "excerpt": "I first encountered this behaviour on Linux desktop with Qt QML apps as far back as 2015. For a long time, I thought it was Qt QML ListView's inefficiency and didn't think much of it. But in recent years, the phenomenon was visible with Dip which was built on rust. Dip does massive parallel fanout using green threads ('may' coroutines) with work being NUMA pinned (software hash) using a thread per core model. A defau", "context": "", "use_case": "fixing memory growth in desktop executable", "switched_from": "default allocator", "story": "Four Months of Zig"}, {"id": 791768624, "item_id": 49485539, "url": "https://news.ycombinator.com/item?id=49485539", "by": "lrvick", "date": "2026-08-28", "stance": "recommend", "quote": "we swap out the default malloc with mimalloc for high performance because why would you not?", "excerpt": "I really find complaints about the minimum viable placeholder malloc in musl confusing. Does anyone seriously try to use malloc-ng for performance critical use cases? Our entire linux distro is musl based BUT we swap out the default malloc with mimalloc for high performance because why would you not? Best of both worlds. https://codeberg.org/stagex/stagex/src/branch/main/packages/core/musl/Containerfile#L54", "context": "runs a musl-based Linux distro", "use_case": "high-performance malloc on musl", "switched_from": "", "story": "Don't use musl if you care about performance"}, {"id": 788858705, "item_id": 49303669, "url": "https://news.ycombinator.com/item?id=49303669", "by": "anthk", "date": "2026-08-14", "stance": "recommend", "quote": "switch to FVWM or use some tool like mimalloc", "excerpt": "The Computational Beauty of Nature it's similar and it has the code of the book there: https://github.com/gwf/CBofN Some tools might crash X under CWM for OpenBSD, switch to FVWM or use some tool like mimalloc. On Lisp, the book basically builds integers based on conses, kinda like Peano Axioms.", "context": "", "use_case": "avoid crashes", "switched_from": "", "story": "G\u00f6del, Escher, Elisp: The Beauty of Macros"}, {"id": 786213089, "item_id": 49138318, "url": "https://news.ycombinator.com/item?id=49138318", "by": "lrvick", "date": "2026-08-01", "stance": "recommend", "quote": "We use musl+mimalloc by default for our entire production operating systems", "excerpt": "We use musl+mimalloc by default for our entire production operating systems: https://stagex.tools", "context": "builds production operating systems", "use_case": "memory allocator replacing musl default", "switched_from": "", "story": "RipGrep musl binaries occasionally segfault during very-large searches"}, {"id": 777831457, "item_id": 48614466, "url": "https://news.ycombinator.com/item?id=48614466", "by": "spliffedr", "date": "2026-06-20", "stance": "recommend", "quote": "it will fit well for a zero-copy and mem aligned reverse proxy", "excerpt": "Take a look at https://github.com/concurrencykit/ck and https://github.com/microsoft/mimalloc, it will fit well for a zero-copy and mem aligned reverse proxy. Also, if you want to add a DDoS protection and more advanced L4 stuff check out https://docs.ebpf.io/ebpf-library/libxdp/libxdp/", "context": "", "use_case": "memory allocator for proxy", "switched_from": "", "story": "Epoll vs. Io_uring in Linux"}]}