1) Allocate a chunk of memory big enough to satisfy the request, and return a pointer to it.2) Remember which chunks of ram are in use and which aren‘t.3) Combine free chunks to make bigger ones.
what a malloc has to do
原文:http://www.cnblogs.com/miaoz/p/3972665.html