摘要
早期Linux的内存分配机制采用伙伴算法,当请求分配的内存大小为几十个字节或几百个字节时会产生内存碎片,严重消耗系统资源。现今采用Slab机制可以缓存物理空间的申请和回收,杜绝外部碎片的产生,降低内部碎片量。本文分析了Slab内存分配机制及其数据结构和接口函数,然后给出了Slab机制的实现。
This paper introduces Slab Assigning mechanism in memory management in I,inux and construction of data and codes in it. This paper also introduces how to use Slab Assigning machine and gives an example .
出处
《现代计算机》
2006年第5期89-91,共3页
Modern Computer