此程序创建一个包含几个节点的链表,填充数据,输出它们,最后删除所有节点。
This program creates a linked list of few nodes, fills in the data, prints them, and finally deletes all the nodes.
注意,与我们的递归程序非常类似,链表的定义也包括一个基线条件 —— 在这里是 NULL 指针。
Notice how like our recursive programs, the definition of a linked list also contains a base case -- in this case, the NULL pointer.
因为最小块大小是16字节,那么只分配链表节点的用户程序就会遭受额外的100%的开销。
Since the minimum chunk size is 16 bytes, user programs allocating only list nodes suffer 100% overhead.
应用推荐