Rev 26 | Rev 34 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 26 | Rev 27 | ||
|---|---|---|---|
| Line 34... | Line 34... | ||
| 34 | 34 | ||
| 35 | <para> |
35 | <para> |
| 36 | <!--graphic fileref="images/mm2.png" /--> |
36 | <!--graphic fileref="images/mm2.png" /--> |
| 37 | 37 | ||
| 38 | <!--graphic fileref="images/buddy_alloc.svg" format="SVG" /--> |
38 | <!--graphic fileref="images/buddy_alloc.svg" format="SVG" /--> |
| 39 | <mediaobject |
- | |
| 40 | 39 | ||
| 41 | 40 | ||
| 42 | </para> |
41 | </para> |
| 43 | 42 | ||
| 44 | <para>On some architectures not whole physical memory is available for |
43 | <para>On some architectures not whole physical memory is available for |
| Line 122... | Line 121... | ||
| 122 | allocate and split larger block from list with index i + 1. Both of |
121 | allocate and split larger block from list with index i + 1. Both of |
| 123 | these algorithms are recursive. The recursion ends either when there are |
122 | these algorithms are recursive. The recursion ends either when there are |
| 124 | no blocks to coalesce in the former case or when there are no blocks |
123 | no blocks to coalesce in the former case or when there are no blocks |
| 125 | that can be split in the latter case.</para> |
124 | that can be split in the latter case.</para> |
| 126 | 125 | ||
| 127 | <graphic fileref="images/mm1.png" format="EPS" /> |
126 | <!--graphic fileref="images/mm1.png" format="EPS" /--> |
| 128 | 127 | ||
| 129 | <para>This approach greatly reduces external fragmentation of memory and |
128 | <para>This approach greatly reduces external fragmentation of memory and |
| 130 | helps in allocating bigger continuous blocks of memory aligned to their |
129 | helps in allocating bigger continuous blocks of memory aligned to their |
| 131 | size. On the other hand, the buddy allocator suffers increased internal |
130 | size. On the other hand, the buddy allocator suffers increased internal |
| 132 | fragmentation of memory and is not suitable for general kernel |
131 | fragmentation of memory and is not suitable for general kernel |