[FE training-materials-updates] Kernel slides: correction about the kmalloc allocator
Michael Opdenacker
michael.opdenacker at free-electrons.com
Sat Feb 1 17:06:22 CET 2014
Repository : git://git.free-electrons.com/training-materials.git
On branch : master
Link : http://git.free-electrons.com/training-materials/commit/?id=78e3397248a408976e642b003d449bcb3f18e659
>---------------------------------------------------------------
commit 78e3397248a408976e642b003d449bcb3f18e659
Author: Michael Opdenacker <michael.opdenacker at free-electrons.com>
Date: Sat Feb 1 15:34:05 2014 +0100
Kernel slides: correction about the kmalloc allocator
- The slab caches do not always have a power of two size
Signed-off-by: Michael Opdenacker <michael.opdenacker at free-electrons.com>
>---------------------------------------------------------------
78e3397248a408976e642b003d449bcb3f18e659
.../kernel-driver-development-memory.tex | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/slides/kernel-driver-development-memory/kernel-driver-development-memory.tex b/slides/kernel-driver-development-memory/kernel-driver-development-memory.tex
index 0135744..425c0ee 100644
--- a/slides/kernel-driver-development-memory/kernel-driver-development-memory.tex
+++ b/slides/kernel-driver-development-memory/kernel-driver-development-memory.tex
@@ -278,9 +278,10 @@
\code{kmalloc-XXX} in \code{/proc/slabinfo}
\item For larger sizes, it relies on the page allocator
\item The allocated area is guaranteed to be physically contiguous
- \item The allocated area size is rounded up to the next power of two
- size (while using the SLAB allocator directly allows to have more
- flexibility)
+ \item The allocated area size is rounded up to the size of the
+ smallest SLAB cache in which it can fit
+ (while using the SLAB allocator directly allows to have more
+ flexibility)
\item It uses the same flags as the page allocator (\ksym{GFP_KERNEL},
\ksym{GFP_ATOMIC}, \ksym{GFP_DMA}, etc.) with the same semantics.
\item Maximum sizes, on \code{x86} and \code{arm} (see
More information about the training-materials-updates
mailing list