Kernel heap tutorial, almost complete