authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-11-11 22:59:03-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-11-29 23:46:02-07:00
log931261752d167ea52e0d1e938a0c2bd7fed85327
treec2f38becc18cf99417c2cfabb0d163fc3ccaab85
parente2e60f5ff9942902e97aebfdf234bb6a0f821dfe

rename a couple variables


1 files changed, 4 insertions(+), 4 deletions(-)

lib/std/heap/WasmAllocator.zig+4-4
......@@ -117,10 +117,10 @@ fn resize(
117117 }
118118 } else {
119119 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);
121121 const new_bigpages_needed = bigPagesNeeded(new_actual_len);
122 const new_big_slot_size = math.ceilPowerOfTwo(usize, new_bigpages_needed) catch return null;
123 if (old_big_slot_size == new_big_slot_size) return new_len;
122 const new_big_slot_pages = math.ceilPowerOfTwo(usize, new_bigpages_needed) catch return null;
123 if (old_big_slot_pages == new_big_slot_pages) return new_len;
124124 if (new_actual_len >= old_actual_len) return null;
125125
126126 const new_small_slot_size = math.ceilPowerOfTwoAssert(usize, new_actual_len);
......@@ -129,7 +129,7 @@ fn resize(
129129 // TODO: push the big allocation into the free list
130130 _ = new_small_class;
131131 } else {
132 const new_big_class = math.log2(new_big_slot_size);
132 const new_big_class = math.log2(new_big_slot_pages);
133133 // TODO: push the upper area into the free list
134134 _ = new_big_class;
135135 }