New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ptmalloc中BINS的数量 #622
Comments
可能是因为这个?就是可能会对 smallbin 的下标进行调整。
没仔细看,可能会有问题。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
不懂就问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: