Bora SAHIN wrote:
Wednesday, June 22, 2005, 1:03:59 PM, you wrote:
Xiangfei> I'm reading a book about kernel memory management. In the book, there is one
Xiangfei> sentence saying "with this combination of allocators (buddy and slab
Xiangfei> allocators), the kernel can ensure the amount of memory wasted due to
Xiangfei> internal fragmentation is kept to a minimum.". From my understanding, I
Xiangfei> think the allocators are used to deal with external fragmentation, not
Xiangfei> internal. Am I right? Please correct me!!!
Buddy for the external fragmentation...
Slab for the internal fragmentation...
can you clarify external vs internal ?
esp for kernel, which doesnt supply memory to just anyone - only to
kernel code.
IIUC, buddy allocators carve up memory into neat 2**n chunks to satisfy
requests,
and coalesce contiguous chunks of freed memory back into larger blocks.
FWIW, (not much I think)
$ grep buddy System.map
$ grep slab System.map |wc
31 93 938
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/