You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bins for sizes < 512 bytes contain chunks of all the same size, spaced
--
8 bytes apart. Larger bins are approximately logarithmically spaced:
64 bins of size 8
32 bins of size 64
16 bins of size 512
8 bins of size 4096
4 bins of size 32768
2 bins of size 262144
1 bin of size what's left
不懂就问Orz。
ptmalloc的malloc_state结果体的bins字段一共声明了127个bin。其中第一个为unsortbin,后面62个为normal bin。然后是63个large bin。那么第127个bin干什么用去了Orz。
另外,按照注释应该存在第64个larger bin用来放超过范围的其他所有chunk
但是在largebin_index 宏中超过大小的所有chunk放在第126个bin,也就是第63个largebin中。
存在什么说法或者我算的有问题么?
The text was updated successfully, but these errors were encountered: