登录 注册
效率与办公工具
13,539
Stars
1,212
Forks
161
Watchers
236
Open Issues
MIT
许可证
C
语言
2019-06-19
创建时间
2026-11-11
最近更新

项目能做什么

紧凑小巧且性能出色的通用内存分配器(mimalloc)。
来源:AI 基于仓库事实生成 · 内容以仓库实际 README 为准

使用说明 查看原始 README 原仓库文档

中文使用说明暂未生成。下面保留原仓库 README 摘录,命令与配置均以原文为准。
原始 README 摘录(英文原文,节选前 3000 字符)
<img align="left" width="100" height="100" src="doc/mimalloc-logo.png"/>
<div align="right">
<sup> v3:</sup><a href="https://github.com/microsoft/mimalloc/actions/workflows/test.yaml"><img src="https://github.com/microsoft/mimalloc/actions/workflows/test.yaml/badge.svg?branch=dev3"/></a>
<sup> v2:</sup><a href="https://github.com/microsoft/mimalloc/actions/workflows/test.yaml"><img src="https://github.com/microsoft/mimalloc/actions/workflows/test.yaml/badge.svg?branch=dev2"/></a>
<sup> v1:</sup><a href="https://github.com/microsoft/mimalloc/actions/workflows/test.yaml"><img src="https://github.com/microsoft/mimalloc/actions/workflows/test.yaml/badge.svg?branch=dev"/></a>
&nbsp;&nbsp;&nbsp;<sup>v3:</sup><a href="https://dev.azure.com/Daan0324/mimalloc/_build?definitionId=1&_a=summary"><img src="https://dev.azure.com/Daan0324/mimalloc/_apis/build/status/microsoft.mimalloc?branchName=dev3"/></a>
</div>

# mimalloc

&nbsp;

mimalloc (pronounced "me-malloc")
is a general purpose allocator with excellent [performance](#performance) characteristics.
Initially developed by Daan Leijen for the runtime systems of the
[Koka](https://koka-lang.github.io) and [Lean](https://github.com/leanprover/lean) languages.

Latest release   : `v3.6.1`  (2026-10-30) recommended.\
Latest v2 release: `v2.5.2`  (2026-09-12) stable, legacy.\
Latest v1 release: `v1.15.2` (2026-09-12) legacy.

mimalloc is a drop-in replacement for `malloc` and can be used in other programs
without code changes, for example, on dynamically linked ELF-based systems (Linux, BSD, etc.) you can use it as:
```
> LD_PRELOAD=/usr/lib/libmimalloc.so  myprogram
```
It also includes a way to dynamically override the default allocator in [Windows](#override_on_windows).
Notable aspects of the design include:

- __small and consistent__: the library is about 12k LOC using simple and
  consistent data structures. This makes it very suitable
  to integrate and adapt in other projects. For runtime systems it
  provides hooks for a monotonic _heartbeat_ and deferred freeing (for
  bounded worst-case times with reference counting).
  Partly due to its simplicity, mimalloc has been ported to many systems (Windows, macOS,
  Linux, WASM, various BSD's, Haiku, MUSL, etc) and has excellent support for dynamic overriding.
  At the same time, it is an industrial strength allocator that runs (very) large scale
  distributed services on thousands of machines with excellent worst case latencies.
- __free list sharding__: instead of one big free list (per size class) we have
  many smaller lists per "mimalloc page" which reduces fragmentation and
  increases locality --
  things that are allocated close in time get allocated close in memory.
  (A mimalloc page contains blocks of one size class and is usually 64KiB on a 64-bit system).
- __free list multi-sharding__: the big idea! Not only do we shard the free list
  per mimalloc page, but for each page we have multiple free lists. In particular, there
  is one list for th
阅读完整原文

项目深度分析 AI 生成

企业级性能剖析与内存降本优化服务

产品构想针对使用 mimalloc 进行 LD_PRELOAD 或静态链接的企业,提供内存画像、长尾延迟消除、碎片分析与云服务器降配咨询。
核心功能内存利用率与延迟审计报告、特定场景(如NUMA架构)参数调优、自动化压测与基准对比方案、热点路径内存优化方案
目标用户云原生微服务企业架构师、量化高频交易团队、游戏服务端负责人
难度/周期高 · 1 - 3 个月 · 成本:人力成本为主(需深厚系统级底层与内核功底),极少量的测试基准云资源
收费模式按咨询项目收费、基于节省的云成本抽成(Gain-share)或按年技术支持合同
竞争风险服务交付难以规模化,极其依赖个人声誉与高深技术能力,成单周期较长
依据 已验证事实

嵌入式/安全增强型分支商业发行版

产品构想基于 mimalloc 的 secure 模式和 first-class heaps 特性,针对汽车电子、航天、工业嵌入式等场景推出具备安全认证(如静态代码合规、防堆利用)的专有商业分发版本。
核心功能增强型堆防溢出/攻击保护套件、特定实时OS(RTOS)定制适配、合规验证文档与确定性延迟(WCAT)报告、商业升级保障
目标用户工业软件厂商、嵌入式车机/IoT系统开发商、高合规安全软件团队
难度/周期极高 · 6 - 12 个月 · 成本:针对特定硬件板卡的采购与测试成本、安全认证申请费用
收费模式分发许可授权费(OEM License)、年度维护与安全漏洞快速修补订阅
竞争风险市场准入门槛极高,认证周期长,且原项目为开源基础库,企业直接Fork自研替代意愿高
依据 AI推测

配套内存追踪与可视化观测工具(mimalloc-telemetry)

产品构想开发一个针对 mimalloc 内部状态(如 page purging、碎片率、各 thread-local/concurrent free list 负载)的轻量级低开销动态监控与 APM 插件。
核心功能无锁低开销指标暴露扩展库、多维度分片热点可视化控制台、内存膨胀与泄漏预警探针、第一类堆(first-class heaps)生命周期追踪
目标用户分布式服务 SRE、基础架构中间件研发工程师
难度/周期中等 · 3 - 6 个月 · 成本:前端与可视化监控开发投入、云端测试环境开销
收费模式以 Open-core 模式销售企业级 Agent 与数据存储/分析看板(SaaS 或本地部署 License)
竞争风险市场偏小众,大部分团队满足于现有通用 APM 工具(如 eBPF 探针、jemalloc 类似工具),付费转化意愿需验证
依据 尚需验证的假设
AI 基于仓库公开数据分析生成,含推测成分,不构成收益承诺。
报告会保存到 个人中心

竞品与相似项目 GitHub Search 真实检索

项目中文简介Stars语言
purpleprotocol/mimalloc_rust 中文介绍暂未生成
A Rust wrapper over Microsoft's MiMalloc memory allocator
846 Rust
daanx/mimalloc-bench 中文介绍暂未生成
Suite for benchmarking malloc implementations.
521 C
LemonHX/mimalloc-rust 中文介绍暂未生成
The Best and Highest-Leveled and Newest bingding for MiMallo
65 C
gnzlbg/mimallocator 中文介绍暂未生成
55 Rust
以上为通过 GitHub 官方 Search API 检索的相似项目,功能差异与优劣势需进一步人工确认,配置 AI 后可生成对比分析。

项目优势与风险

技术成熟度创建于 2019-06-19,近 30 天仍在推送,发布过 13 个 Release
社区活跃Star 13,539 / Fork 1,212 / Issue 236(数据支持,可自行核实)
许可证MIT
主要风险上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价

安装与使用

此项目未提供 Docker 镜像,安装步骤以原仓库 README 为准(涉及依赖安装与环境配置,对新手门槛较高)。