Some information about vmalloc.
[cascardo/kernel/slides/.git] / 09memory / memory
1 %Memory
2 %Thadeu Cascardo
3
4 # Memory
5
6 * Real (Physical) Address
7 * Virtual Address
8 * Bus Address
9 * Linear Address
10
11 # Memory Zones
12
13 * Normal Zone
14 * DMA Zone
15 * High Memory Zone
16
17 # Flags
18
19 * GFP\\_KERNEL
20 * GFP\\_ATOMIC
21 * GFP\\_USER
22 * GFP\\_HIGHUSER
23 * GFP\\_NOFS
24 * GFP\\_NOIO
25 * \\_\\_GFP\\_ZERO
26 * \\_\\_GFP\\_DMA
27 * \\_\\_GFP\\_HIGHMEM
28 * \\_\\_GFP\\_NOWARN
29 * \\_\\_GFP\\_REPEAT
30 * \\_\\_GFP\\_NOFAIL
31 * \\_\\_GFP\\_NORETRY
32
33 # Slab (lookaside cache)
34
35 * include linux/slab.h
36 * struct kmem\\_cache
37 * kmem\\_cache\\_create(name, size, offset, flags, constructor);
38 * kmem\\_cache\\_destroy(kmc)
39 * kmem\\_cache\\_alloc(kmc, gfp)
40 * kmem\\_cache\\_free(kmc, ptr)
41
42 # vmalloc
43
44 * Virtual memory with many pages allocated not linearly in the physical space
45 * Mapped in a different address range
46 * include linux/vmalloc.h
47 * vmalloc(size)
48 * vfree(addr)
49
50 # GFP
51