Commit 36cbc6b
committed
dma: allocate the nearest size
Currently in the `DmaAllocator`, if the request size was greater than
PAGE_SIZE (4KiB), the allocator would allocate a 2MiB page to satisfy
the allocation request. The memory required to satisfy the request is
relaxed by finding the nearest buddy order from the allocation request
size and allocating with that order instead.
Signed-off-by: Andy-Python-Programmer <andypythonappdeveloper@gmail.com>1 parent 8c9b70e commit 36cbc6b
3 files changed
+31
-41
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
114 | 119 | | |
115 | 120 | | |
116 | 121 | | |
117 | 122 | | |
118 | 123 | | |
119 | 124 | | |
120 | 125 | | |
121 | | - | |
| 126 | + | |
| 127 | + | |
122 | 128 | | |
123 | 129 | | |
124 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
81 | 95 | | |
82 | 96 | | |
83 | 97 | | |
84 | 98 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
| 99 | + | |
| 100 | + | |
94 | 101 | | |
95 | 102 | | |
96 | 103 | | |
| |||
106 | 113 | | |
107 | 114 | | |
108 | 115 | | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
| 116 | + | |
| 117 | + | |
114 | 118 | | |
115 | 119 | | |
116 | 120 | | |
| |||
177 | 181 | | |
178 | 182 | | |
179 | 183 | | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
189 | 187 | | |
190 | 188 | | |
191 | 189 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
| 38 | + | |
49 | 39 | | |
| 40 | + | |
50 | 41 | | |
51 | 42 | | |
52 | 43 | | |
53 | 44 | | |
54 | | - | |
| 45 | + | |
55 | 46 | | |
56 | 47 | | |
57 | 48 | | |
| |||
63 | 54 | | |
64 | 55 | | |
65 | 56 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | 57 | | |
72 | 58 | | |
73 | 59 | | |
| |||
0 commit comments