摘要: [TOC] 分箱式内存管理 Unsorted bin Unsorted bin 可以看作是 small bins 和 large bins 的 cache,只有一个 unsorted bin,以双向链表管理空闲 chunk,空闲 chunk 不排序,所有的 chunk 在回收时都要先放到 unsor 阅读全文
posted @ 2019-12-05 20:49 不想取名字a 阅读(590) 评论(0) 推荐(0)
摘要: [TOC] 分箱式内存管理 对于空闲的 chunk,ptmalloc 采用分箱式内存管理方式,根据空闲 chunk 的大小和处于的状态将其放在四个不同的 bin 中,这四个空闲 chunk 的容器包括 fast bins,unsorted bin,small bins 和 large bins。Fa 阅读全文
posted @ 2019-12-05 11:22 不想取名字a 阅读(433) 评论(0) 推荐(0)