cpp/memory/malloc_free #31
Replies: 3 comments 1 reply
-
这篇感觉写的有一点乱了 |
Beta Was this translation helpful? Give feedback.
-
bins[64,127)称为large_bins,用于维护>512字节的内存块,每个元素对应的链表中的chunk大小不同,index越大,链表中chunk的内存大小相差越大,例如: 下标为64的chunk大小介于[512, 512+64),下标为95的chunk大小介于[2k+1,2k+512)。同一条链表上的chunk,按照从小到大的顺序排列。 |
Beta Was this translation helpful? Give feedback.
-
一个比较好的malloc和free的简易实现:https://www.bilibili.com/video/BV1Dy4y1579m/?spm_id_from=333.788.recommend_more_video.-1&vd_source=b257fee9bc4fee2c8e3c32a75effdb7f |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
cpp/memory/malloc_free
编程指北: 计算机系统学习指南, 操作系统, 计算机网络, C++, Java, 算法, 数据结构
https://csguide.cn/cpp/memory/malloc_free.html
Beta Was this translation helpful? Give feedback.
All reactions