| ... | @@ -117,10 +117,10 @@ fn resize( | ... | @@ -117,10 +117,10 @@ fn resize( |
| 117 | } | 117 | } |
| 118 | } else { | 118 | } else { |
| 119 | const old_bigpages_needed = bigPagesNeeded(old_actual_len); | 119 | const old_bigpages_needed = bigPagesNeeded(old_actual_len); |
| 120 | const old_big_slot_size = math.ceilPowerOfTwoAssert(usize, old_bigpages_needed); | 120 | const old_big_slot_pages = math.ceilPowerOfTwoAssert(usize, old_bigpages_needed); |
| 121 | const new_bigpages_needed = bigPagesNeeded(new_actual_len); | 121 | const new_bigpages_needed = bigPagesNeeded(new_actual_len); |
| 122 | const new_big_slot_size = math.ceilPowerOfTwo(usize, new_bigpages_needed) catch return null; | 122 | const new_big_slot_pages = math.ceilPowerOfTwo(usize, new_bigpages_needed) catch return null; |
| 123 | if (old_big_slot_size == new_big_slot_size) return new_len; | 123 | if (old_big_slot_pages == new_big_slot_pages) return new_len; |
| 124 | if (new_actual_len >= old_actual_len) return null; | 124 | if (new_actual_len >= old_actual_len) return null; |
| 125 | | 125 | |
| 126 | const new_small_slot_size = math.ceilPowerOfTwoAssert(usize, new_actual_len); | 126 | const new_small_slot_size = math.ceilPowerOfTwoAssert(usize, new_actual_len); |
| ... | @@ -129,7 +129,7 @@ fn resize( | ... | @@ -129,7 +129,7 @@ fn resize( |
| 129 | // TODO: push the big allocation into the free list | 129 | // TODO: push the big allocation into the free list |
| 130 | _ = new_small_class; | 130 | _ = new_small_class; |
| 131 | } else { | 131 | } else { |
| 132 | const new_big_class = math.log2(new_big_slot_size); | 132 | const new_big_class = math.log2(new_big_slot_pages); |
| 133 | // TODO: push the upper area into the free list | 133 | // TODO: push the upper area into the free list |
| 134 | _ = new_big_class; | 134 | _ = new_big_class; |
| 135 | } | 135 | } |