Skip to content

Commit 166d14e

Browse files
committed
stdlib: Actually increase arena chunk sizes by powers of two
1 parent b210c7a commit 166d14e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libstd/arena.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ impl arena for arena {
2727
let mut head = list::head(self.chunks);
2828
let chunk_size = vec::alloc_len(head.data);
2929
let new_min_chunk_size = uint::max(n_bytes, chunk_size);
30-
head = chunk(uint::next_power_of_two(new_min_chunk_size));
30+
head = chunk(uint::next_power_of_two(new_min_chunk_size + 1u));
3131
self.chunks = list::cons(head, @self.chunks);
3232

3333
ret self.alloc(n_bytes, align);

0 commit comments

Comments
 (0)