Rev 97 | Rev 105 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 97 | Rev 101 | ||
|---|---|---|---|
| Line 55... | Line 55... | ||
| 55 | organization of physical memory, the frame allocator is always working |
55 | organization of physical memory, the frame allocator is always working |
| 56 | within a context of a particular frame zone. In order to carry out the |
56 | within a context of a particular frame zone. In order to carry out the |
| 57 | allocation requests, the frame allocator is tightly integrated with the |
57 | allocation requests, the frame allocator is tightly integrated with the |
| 58 | buddy system belonging to the zone. The frame allocator is also |
58 | buddy system belonging to the zone. The frame allocator is also |
| 59 | responsible for updating information about the number of free and busy |
59 | responsible for updating information about the number of free and busy |
| 60 | frames in the zone. <figure> |
60 | frames in the zone. <figure float="1"> |
| 61 | <mediaobject id="frame_alloc"> |
61 | <mediaobject id="frame_alloc"> |
| 62 | <imageobject role="pdf"> |
62 | <imageobject role="pdf"> |
| 63 | <imagedata fileref="images.vector/frame_alloc.pdf" format="PDF" /> |
63 | <imagedata fileref="images.vector/frame_alloc.pdf" format="PDF" /> |
| 64 | </imageobject> |
64 | </imageobject> |
| 65 | 65 | ||
| Line 120... | Line 120... | ||
| 120 | <para>This approach greatly reduces external fragmentation of memory and |
120 | <para>This approach greatly reduces external fragmentation of memory and |
| 121 | helps in allocating bigger continuous blocks of memory aligned to their |
121 | helps in allocating bigger continuous blocks of memory aligned to their |
| 122 | size. On the other hand, the buddy allocator suffers increased internal |
122 | size. On the other hand, the buddy allocator suffers increased internal |
| 123 | fragmentation of memory and is not suitable for general kernel |
123 | fragmentation of memory and is not suitable for general kernel |
| 124 | allocations. This purpose is better addressed by the <link |
124 | allocations. This purpose is better addressed by the <link |
| 125 | linkend="slab">slab allocator</link>.<figure> |
125 | linkend="slab">slab allocator</link>.<figure float="1"> |
| 126 | <mediaobject id="buddy_alloc"> |
126 | <mediaobject id="buddy_alloc"> |
| 127 | <imageobject role="pdf"> |
127 | <imageobject role="pdf"> |
| 128 | <imagedata fileref="images.vector/buddy_alloc.pdf" format="PDF" /> |
128 | <imagedata fileref="images.vector/buddy_alloc.pdf" format="PDF" /> |
| 129 | </imageobject> |
129 | </imageobject> |
| 130 | 130 | ||
| Line 243... | Line 243... | ||
| 243 | objects from magazines, calling slab cache destructor on them and |
243 | objects from magazines, calling slab cache destructor on them and |
| 244 | putting them back into slabs. When a slab contanins no allocated object, |
244 | putting them back into slabs. When a slab contanins no allocated object, |
| 245 | it is immediately freed.</para> |
245 | it is immediately freed.</para> |
| 246 | 246 | ||
| 247 | <para> |
247 | <para> |
| 248 | <figure> |
248 | <figure float="1"> |
| 249 | <mediaobject id="slab_alloc"> |
249 | <mediaobject id="slab_alloc"> |
| 250 | <imageobject role="pdf"> |
250 | <imageobject role="pdf"> |
| 251 | <imagedata fileref="images.vector/slab_alloc.pdf" format="PDF" /> |
251 | <imagedata fileref="images.vector/slab_alloc.pdf" format="PDF" /> |
| 252 | </imageobject> |
252 | </imageobject> |
| 253 | 253 | ||