>I'm reading a book about kernel memory management. In
the book, there is one sentence saying >"with this combination of allocators (buddy and slab allocators), the kernel can >ensure the amount of memory wasted due to internal fragmentation is kept to a minimum.". >From my understanding, I think the allocators are used to deal with external fragmentation, not internal. Am I right? Please correct me!!! The buddy allocator leads to internal fragmentation if we allocate a small chunk of memory. To overcome this problem the slab allocator is used. it keeps two sets of caches ,one cache is for normal use & the other for DMA. it gets pages from the buddy and provides kmalloc/kfree to allocate/deallocate small chunks of memory from these. you may like to have a look at... Understanding TheLinux Virtual Memory Manager By Mel Gorman http://www.csn.ul.ie/mel/projects/vm Thanks & Regards lk |