3 ms·
The implementation of malloc in K&R is about 20 lines...
by pjc50 9y ago
The implementation of malloc in K&R is about 20 lines...
- masklinn 9y agoIt's closer to 50 lines if you don't exclude the morecore helper, and that's using the pretty opaque, outdated and golfy style of K&R itself.
- vardump 9y agoGoogled it and found this: https://stackoverflow.com/questions/13159564/explain-this-implementation-of-malloc-from-the-kr-book https://stackoverflow.com/questions/13159564/explain-this-im... Looks like quite a bit more than 20 lines.