3 ms·
A bit of constructive criticism: it's nice when people do deep dives of components, but I think this one is too deep: it basically pastes all the code that is e
by saagarjha 7y ago
A bit of constructive criticism: it's nice when people do deep dives of components, but I think this one is too deep: it basically pastes all the code that is executed and then explains exactly what the code is doing, which isn't really that useful; I don't need to be told how to read C, as I can do so myself. And in fact, I think it's a bit counterproductive: I very quickly got lost in the minute details presented. What I really want is an overview of what the code does (and ideally, why) not how it does it.
- bsdb0y 7y agoFirst of all, Thank you for sharing your thoughts. I am beginner into this. And, yes, it is deep because OpenBSD malloc(3) has lots of features and I have tried to cover each and every line of code. So, I have shared all my learning and the process of how I learned. In future, if people want to learn anything that requires malloc(3) understanding they can refer to this. And, yes I have to paste the code otherwise it would be difficult to track the explanation and respective code. I have explained the following things: - What is the code doing - Reason on why is it doing that - tried to explain the developers' idea behind that code algorithm - tried to explain the mathematical calculations on the basis of sample code through the debugger And, the blog is for everyone, irrespective of ability to read C, or understanding of malloc(3) internals. If you got lost then please keep patience because for me it took exactly 30 days to understand, still, I am learning it. At least read the whole blog again and then if you want, you can make the remark as per your understanding. If you go through the whole blog, you will find out mailing lists and twitter links where the author discussed his queries and the reasons/ideas with the developer. Hope I cleared your queries, if you still have some doubts then please read the whole blog again, or you can also directly jump into the source code and learn it from there.