A Quick Tutorial on Implementing and Debugging Malloc, Free, Calloc, and Realloc

thoughts...

“This tutorial is going to assume that you know what pointers are, and that you know enough C to know that *ptr dereferences a pointer, ptr->foo means (*ptr).foo, that malloc is used to dynamically allocate space, and that you’re familiar with the concept of a linked list. If you decide to work through this tutorial without really knowing C, please let me know what parts could use more exposition. If you want to look at all of this code at once, it’s available here. The tests are from Andrew Roth, who had a github repo lying around with some tests for malloc…”

http://danluu.com/malloc-tutorial/

View original post

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: