# glibc的malloc自己管理内存池

- 地址：https://hub.1ms.news/events/2883
- 首发：2026-11-09 19:31（北京时间），Hacker News 热门
- 报道：1 家来源，1 条
- 原文：https://benmandrew.com/articles/what-is-malloc-doing-anyway

## 摘要

连续调用malloc(16)一千次，glibc只发起两次brk系统调用，第二次一次扩展132 KiB，其余999次从池中切分。实测一次空系统调用耗时575纳秒，malloc(16)仅需26.9纳秒，快22.7倍。

## 原文片段

> What is malloc doing, anyway?
> 
> Hacker News 147 points · 32 comments
> https://news.ycombinator.com/item?id=50424157

---
来自 1ms.news（https://hub.1ms.news）。内容整理自公开来源，以原文为准。
