Debian Codegraph @

debian/rust-vendor/bumpalo/CHANGELOG.md

raw
1 ## Unreleased
2
3 Released YYYY-MM-DD.
4
5 ### Added
6
7 * TODO (or remove section if none)
8
9 ### Changed
10
11 * TODO (or remove section if none)
12
13 ### Deprecated
14
15 * TODO (or remove section if none)
16
17 ### Removed
18
19 * TODO (or remove section if none)
20
21 ### Fixed
22
23 * TODO (or remove section if none)
24
25 ### Security
26
27 * TODO (or remove section if none)
28
29 --------------------------------------------------------------------------------
30
31 ## 3.20.3
32
33 Released 2026-05-22.
34
35 ### Fixed
36
37 * Fixed the `try_alloc_slice_fill_with`, `alloc_slice_try_fill_with`,
38 `alloc_slice_fill_with` methods to properly rewind the bump pointer on
39 allocation, initialization, and panic failure and avoid wasting bump capacity.
40 * Fixed a drop bug in `bumpalo::collections::vec::DrainFilter` (used by `retain`
41 and `retain_mut`) when the predicate panics.
42
43 --------------------------------------------------------------------------------
44
45 ## 3.20.2
46
47 Released 2026-02-19.
48
49 ### Fixed
50
51 * Restored `Send` and `Sync` implementations for `Box<T>` for `T: ?Sized` types
52 as well.
53
54 --------------------------------------------------------------------------------
55
56 ## 3.20.1
57
58 Released 2026-02-18.
59
60 ### Fixed
61
62 * Restored `Send` and `Sync` implementations for `Box<T>` when `T: Send` and `T:
63 Sync` respectively.
64
65 --------------------------------------------------------------------------------
66
67 ## 3.20.0
68
69 Released 2026-02-18.
70
71 ### Added
72
73 * Added the `bumpalo::collections::Vec::pop_if` method.
74
75 ### Fixed
76
77 * Fixed a bug in the `bumpalo::collections::String::retain` method in the face
78 of panics.
79 * Made `bumpalo::collections::Box<T>` covariant with `T` (just like
80 `std::boxed::Box<T>`).
81
82 --------------------------------------------------------------------------------
83
84 ## 3.19.1
85
86 Released 2025-12-16.
87
88 ### Changed
89
90 * Annotated `bumpalo::collections::String::from_str_in` as `#[inline]`.
91
92 ### Fixed
93
94 * Fixed compilation failures with the latest nightly Rust when enabling the
95 unstable `allocator_api` feature.
96
97 --------------------------------------------------------------------------------
98
99 ## 3.19.0
100
101 Released 2025-06-24.
102
103 ### Added
104
105 * Added `bumpalo::collections::Vec::retain_mut`, similar to
106 `std::vec::Vec::retain_mut`.
107
108 --------------------------------------------------------------------------------
109
110 ## 3.18.1
111
112 Released 2025-06-05.
113
114 ### Removed
115
116 * Removed the `allocator-api2` version bump from 3.18.0, as it was not actually
117 semver compatible.
118
119 --------------------------------------------------------------------------------
120
121 ## 3.18.0 (yanked)
122
123 Released 2025-06-05.
124
125 ### Added
126
127 * Added support for enforcing a minimum alignment on all allocations inside a
128 `Bump` arena, which can provide speed ups when allocating objects whose
129 alignment is less than or equal to that minimum.
130 * Added `serde` serialization support for `bumpalo::collections::String`.
131 * Added some missing fallible slice allocation function variants.
132
133 ### Changed
134
135 * Replaced `extend_from_slice` implementation with a formally-verified version
136 that is also faster and more-optimizable for LLVM.
137 * Updated `allocator-api2` support to version `0.3.*`.
138
139 ### Fixed
140
141 * Fixed a bug where the `allocated_bytes` metrics helper was accidentally
142 including the size of `bumpalo`'s footer, rather than just reporting the
143 user-allocated bytes.
144
145 --------------------------------------------------------------------------------
146
147 ## 3.17.0
148
149 Released 2025-01-28.
150
151 ### Added
152
153 * Added a bunch of `try_` allocation methods for slices and `str`:
154 * `try_alloc_slice_fill_default`
155 * `try_alloc_slice_fill_iter`
156 * `try_alloc_slice_fill_clone`
157 * `try_alloc_slice_fill_copy`
158 * `try_alloc_slice_fill_with`
159 * `try_alloc_str`
160 * `try_alloc_slice_clone`
161 * `try_alloc_slice_copy`
162
163 ### Changed
164
165 * Minimum supported Rust version reduced to 1.71.1
166
167 ### Fixed
168
169 * Fixed a stacked-borrows MIRI bug in `dealloc`
170
171 --------------------------------------------------------------------------------
172
173 ## 3.16.0
174
175 Released 2024-04-08.
176
177 ### Added
178
179 * Added an optional, off-by-default dependency on the `serde` crate. Enabling
180 this dependency allows you to serialize Bumpalo's collection and box
181 types. Deserialization is not implemented, due to constraints of the
182 deserialization trait.
183
184 --------------------------------------------------------------------------------
185
186 ## 3.15.4
187
188 Released 2024-03-07.
189
190 ### Added
191
192 * Added the `bumpalo::collections::Vec::extend_from_slices_copy` method, which
193 is a faster way to extend a vec from multiple slices when the element is
194 `Copy` than calling `extend_from_slice_copy` N times.
195
196 --------------------------------------------------------------------------------
197
198 ## 3.15.3
199
200 Released 2024-02-22.
201
202 ### Added
203
204 * Added additional performance improvements to `bumpalo::collections::Vec`
205 related to reserving capacity.
206
207 --------------------------------------------------------------------------------
208
209 ## 3.15.2
210
211 Released 2024-02-21.
212
213 ### Added
214
215 * Add a `bumpalo::collections::Vec::extend_from_slice_copy` method. This doesn't
216 exist on the standard library's `Vec` but they have access to specialization,
217 so their regular `extend_from_slice` has a specialization for `Copy`
218 types. Using this new method for `Copy` types is a ~80x performance
219 improvement over the plain `extend_from_slice` method.
220
221 --------------------------------------------------------------------------------
222
223 ## 3.15.1
224
225 Released 2024-02-20.
226
227 ### Fixed
228
229 * Fixed the MSRV listed in `Cargo.toml`, whose update was forgotten when the
230 MSRV bumped in release 3.15.0.
231
232 --------------------------------------------------------------------------------
233
234 ## 3.15.0
235
236 Released 2024-02-15.
237
238 ### Changed
239
240 * The minimum supported Rust version (MSRV) is now 1.73.0.
241 * `bumpalo::collections::String::push_str` and
242 `bumpalo::collections::String::from_str_in` received significant performance
243 improvements.
244 * Allocator trait methods are now marked `#[inline]`, increasing performance for
245 some callers.
246
247 ### Fixed
248
249 * Fixed an edge-case bug in the `Allocator::shrink` method.
250
251 --------------------------------------------------------------------------------
252
253 ## 3.14.0
254
255 Released 2023-09-14.
256
257 ### Added
258
259 * Added the `std` cargo feature, which enables implementations of `std` traits
260 for various things. Right now that is just `std::io::Write` for
261 `bumpalo::collections::Vec`, but could be more in the future.
262
263 --------------------------------------------------------------------------------
264
265 ## 3.13.0
266
267 Released 2023-05-22.
268
269 ### Added
270
271 * New `"allocator-api2"` feature enables the use of the allocator API on
272 stable. This feature uses a crate that mirrors the API of the unstable Rust
273 `allocator_api` feature. If the feature is enabled, references to `Bump` will
274 implement `allocator_api2::Allocator`. This allows `Bump` to be used as an
275 allocator for collection types from `allocator-api2` and any other crates that
276 support `allocator-api2`.
277
278 ### Changed
279
280 * The minimum supported Rust version (MSRV) is now 1.63.0.
281
282 --------------------------------------------------------------------------------
283
284 ## 3.12.2
285
286 Released 2023-05-09.
287
288 ### Changed
289
290 * Added `rust-version` metadata to `Cargo.toml` which helps `cargo` with version
291 resolution.
292
293 --------------------------------------------------------------------------------
294
295 ## 3.12.1
296
297 Released 2023-04-21.
298
299 ### Fixed
300
301 * Fixed a bug where `Bump::try_with_capacity(n)` where `n > isize::MAX` could
302 lead to attempts to create invalid `Layout`s.
303
304 --------------------------------------------------------------------------------
305
306 ## 3.12.0
307
308 Released 2023-01-17.
309
310 ### Added
311
312 * Added the `bumpalo::boxed::Box::bump` and `bumpalo::collections::String::bump`
313 getters to get the underlying `Bump` that a string or box was allocated into.
314
315 ### Changed
316
317 * Some uses of `Box` that MIRI did not previously consider as UB are now
318 reported as UB, and `bumpalo`'s internals have been adjusted to avoid the new
319 UB.
320
321 --------------------------------------------------------------------------------
322
323 ## 3.11.1
324
325 Released 2022-10-18.
326
327 ### Security
328
329 * Fixed a bug where when `std::vec::IntoIter` was ported to
330 `bumpalo::collections::vec::IntoIter`, it didn't get its underlying `Bump`'s
331 lifetime threaded through. This meant that `rustc` was not checking the
332 borrows for `bumpalo::collections::IntoIter` and this could result in
333 use-after-free bugs.
334
335 --------------------------------------------------------------------------------
336
337 ## 3.11.0
338
339 Released 2022-08-17.
340
341 ### Added
342
343 * Added support for per-`Bump` allocation limits. These are enforced only in the
344 slow path when allocating new chunks in the `Bump`, not in the bump allocation
345 hot path, and therefore impose near zero overhead.
346 * Added the `bumpalo::boxed::Box::into_inner` method.
347
348 ### Changed
349
350 * Updated to Rust 2021 edition.
351 * The minimum supported Rust version (MSRV) is now 1.56.0.
352
353 --------------------------------------------------------------------------------
354
355 ## 3.10.0
356
357 Released 2022-06-01.
358
359 ### Added
360
361 * Implement `bumpalo::collections::FromIteratorIn` for `Option` and `Result`,
362 just like `core` does for `FromIterator`.
363 * Implement `bumpalo::collections::FromIteratorIn` for `bumpalo::boxed::Box<'a,
364 [T]>`.
365 * Added running tests under MIRI in CI for additional confidence in unsafe code.
366 * Publicly exposed `bumpalo::collections::Vec::drain_filter` since the
367 corresponding `std::vec::Vec` method has stabilized.
368
369 ### Changed
370
371 * `Bump::new` will not allocate a backing chunk until the first allocation
372 inside the bump arena now.
373
374 ### Fixed
375
376 * Properly account for alignment changes when growing or shrinking an existing
377 allocation.
378 * Removed all internal integer-to-pointer casts, to play better with UB checkers
379 like MIRI.
380
381 --------------------------------------------------------------------------------
382
383 ## 3.9.1
384
385 Released 2022-01-06.
386
387 ### Fixed
388
389 * Fixed link to logo in docs and README.md
390
391 --------------------------------------------------------------------------------
392
393 ## 3.9.0
394
395 Released 2022-01-05.
396
397 ### Changed
398
399 * The minimum supported Rust version (MSRV) has been raised to Rust 1.54.0.
400
401 * `bumpalo::collections::Vec<T>` implements relevant traits for all arrays of
402 any size `N` via const generics. Previously, it was just arrays up to length
403 32. Similar for `bumpalo::boxed::Box<[T; N]>`.
404
405 --------------------------------------------------------------------------------
406
407 ## 3.8.0
408
409 Released 2021-10-19.
410
411 ### Added
412
413 * Added the `CollectIn` and `FromIteratorIn` traits to make building a
414 collection from an iterator easier. These new traits live in the
415 `bumpalo::collections` module and are implemented by
416 `bumpalo::collections::{String,Vec}`.
417
418 * Added the `Bump::iter_allocated_chunks_raw` method, which is an `unsafe`, raw
419 version of `Bump::iter_allocated_chunks`. The new method does not take an
420 exclusive borrow of the `Bump` and yields raw pointer-and-length pairs for
421 each chunk in the bump. It is the caller's responsibility to ensure that no
422 allocation happens in the `Bump` while iterating over chunks and that there
423 are no active borrows of allocated data if they want to turn any
424 pointer-and-length pairs into slices.
425
426 --------------------------------------------------------------------------------
427
428 ## 3.7.1
429
430 Released 2021-09-17.
431
432 ### Changed
433
434 * The packaged crate uploaded to crates.io when `bumpalo` is published is now
435 smaller, thanks to excluding unnecessary files.
436
437 --------------------------------------------------------------------------------
438
439 ## 3.7.0
440
441 Released 2020-05-28.
442
443 ### Added
444
445 * Added `Borrow` and `BorrowMut` trait implementations for
446 `bumpalo::collections::Vec` and
447 `bumpalo::collections::String`. [#108](https://github.com/fitzgen/bumpalo/pull/108)
448
449 ### Changed
450
451 * When allocating a new chunk fails, don't immediately give up. Instead, try
452 allocating a chunk that is half that size, and if that fails, then try half of
453 *that* size, etc until either we successfully allocate a chunk or we fail to
454 allocate the minimum chunk size and then finally give
455 up. [#111](https://github.com/fitzgen/bumpalo/pull/111)
456
457 --------------------------------------------------------------------------------
458
459 ## 3.6.1
460
461 Released 2020-02-18.
462
463 ### Added
464
465 * Improved performance of `Bump`'s `Allocator::grow_zeroed` trait method
466 implementation. [#99](https://github.com/fitzgen/bumpalo/pull/99)
467
468 --------------------------------------------------------------------------------
469
470 ## 3.6.0
471
472 Released 2020-01-29.
473
474 ### Added
475
476 * Added a few new flavors of allocation:
477
478 * `try_alloc` for fallible, by-value allocation
479
480 * `try_alloc_with` for fallible allocation with an infallible initializer
481 function
482
483 * `alloc_try_with` for infallible allocation with a fallible initializer
484 function
485
486 * `try_alloc_try_with` method for fallible allocation with a fallible
487 initializer function
488
489 We already have infallible, by-value allocation (`alloc`) and infallible
490 allocation with an infallible initializer (`alloc_with`). With these new
491 methods, we now have every combination covered.
492
493 Thanks to [Tamme Schichler](https://github.com/Tamschi) for contributing these
494 methods!
495
496 --------------------------------------------------------------------------------
497
498 ## 3.5.0
499
500 Released 2020-01-22.
501
502 ### Added
503
504 * Added experimental, unstable support for the unstable, nightly Rust
505 `allocator_api` feature.
506
507 The `allocator_api` feature defines an `Allocator` trait and exposes custom
508 allocators for `std` types. Bumpalo has a matching `allocator_api` cargo
509 feature to enable implementing `Allocator` and using `Bump` with `std`
510 collections.
511
512 First, enable the `allocator_api` feature in your `Cargo.toml`:
513
514 ```toml
515 [dependencies]
516 bumpalo = { version = "3.5", features = ["allocator_api"] }
517 ```
518
519 Next, enable the `allocator_api` nightly Rust feature in your `src/lib.rs` or `src/main.rs`:
520
521 ```rust
522 # #[cfg(feature = "allocator_api")]
523 # {
524 #![feature(allocator_api)]
525 # }
526 ```
527
528 Finally, use `std` collections with `Bump`, so that their internal heap
529 allocations are made within the given bump arena:
530
531 ```
532 # #![cfg_attr(feature = "allocator_api", feature(allocator_api))]
533 # #[cfg(feature = "allocator_api")]
534 # {
535 #![feature(allocator_api)]
536 use bumpalo::Bump;
537
538 // Create a new bump arena.
539 let bump = Bump::new();
540
541 // Create a `Vec` whose elements are allocated within the bump arena.
542 let mut v = Vec::new_in(&bump);
543 v.push(0);
544 v.push(1);
545 v.push(2);
546 # }
547 ```
548
549 I'm very excited to see custom allocators in `std` coming along! Thanks to
550 Arthur Gautier for implementing support for the `allocator_api` feature for
551 Bumpalo.
552
553 --------------------------------------------------------------------------------
554
555 ## 3.4.0
556
557 Released 2020-06-01.
558
559 ### Added
560
561 * Added the `bumpalo::boxed::Box<T>` type. It is an owned pointer referencing a
562 bump-allocated value, and it runs `T`'s `Drop` implementation on the
563 referenced value when dropped. This type can be used by enabling the `"boxed"`
564 cargo feature flag.
565
566 --------------------------------------------------------------------------------
567
568 ## 3.3.0
569
570 Released 2020-05-13.
571
572 ### Added
573
574 * Added fallible allocation methods to `Bump`: `try_new`, `try_with_capacity`,
575 and `try_alloc_layout`.
576
577 * Added `Bump::chunk_capacity`
578
579 * Added `bumpalo::collections::Vec::try_reserve[_exact]`
580
581 --------------------------------------------------------------------------------
582
583 ## 3.2.1
584
585 Released 2020-03-24.
586
587 ### Security
588
589 * When `realloc`ing, if we allocate new space, we need to copy the old
590 allocation's bytes into the new space. There are `old_size` number of bytes in
591 the old allocation, but we were accidentally copying `new_size` number of
592 bytes, which could lead to copying bytes into the realloc'd space from past
593 the chunk that we're bump allocating out of, from unknown memory.
594
595 If an attacker can cause `realloc`s, and can read the `realoc`ed data back,
596 this could allow them to read things from other regions of memory that they
597 shouldn't be able to. For example, if some crypto keys happened to live in
598 memory right after a chunk we were bump allocating out of, this could allow
599 the attacker to read the crypto keys.
600
601 Beyond just fixing the bug and adding a regression test, I've also taken two
602 additional steps:
603
604 1. While we were already running the testsuite under `valgrind` in CI, because
605 `valgrind` exits with the same code that the program did, if there are
606 invalid reads/writes that happen not to trigger a segfault, the program can
607 still exit OK and we will be none the wiser. I've enabled the
608 `--error-exitcode=1` flag for `valgrind` in CI so that tests eagerly fail
609 in these scenarios.
610
611 2. I've written a quickcheck test to exercise `realloc`. Without the bug fix
612 in this patch, this quickcheck immediately triggers invalid reads when run
613 under `valgrind`. We didn't previously have quickchecks that exercised
614 `realloc` because `realloc` isn't publicly exposed directly, and instead
615 can only be indirectly called. This new quickcheck test exercises `realloc`
616 via `bumpalo::collections::Vec::resize` and
617 `bumpalo::collections::Vec::shrink_to_fit` calls.
618
619 This bug was introduced in version 3.0.0.
620
621 See [#69](https://github.com/fitzgen/bumpalo/issues/69) for details.
622
623 --------------------------------------------------------------------------------
624
625 ## 3.2.0
626
627 Released 2020-02-07.
628
629 ### Added
630
631 * Added the `bumpalo::collections::Vec::into_bump_slice_mut` method to turn a
632 `bumpalo::collections::Vec<'bump, T>` into a `&'bump mut [T]`.
633
634 --------------------------------------------------------------------------------
635
636 ## 3.1.2
637
638 Released 2020-01-07.
639
640 ### Fixed
641
642 * The `bumpalo::collections::format!` macro did not used to accept a trailing
643 comma like `format!(in bump; "{}", 1,)`, but it does now.
644
645 --------------------------------------------------------------------------------
646
647 ## 3.1.1
648
649 Released 2020-01-03.
650
651 ### Fixed
652
653 * The `bumpalo::collections::vec!` macro did not used to accept a trailing
654 comma like `vec![in bump; 1, 2,]`, but it does now.
655
656 --------------------------------------------------------------------------------
657
658 ## 3.1.0
659
660 Released 2019-12-27.
661
662 ### Added
663
664 * Added the `Bump::allocated_bytes` diagnostic method for counting the total
665 number of bytes a `Bump` has allocated.
666
667 --------------------------------------------------------------------------------
668
669 # 3.0.0
670
671 Released 2019-12-20.
672
673 ## Added
674
675 * Added `Bump::alloc_str` for copying string slices into a `Bump`.
676
677 * Added `Bump::alloc_slice_copy` and `Bump::alloc_slice_clone` for copying or
678 cloning slices into a `Bump`.
679
680 * Added `Bump::alloc_slice_fill_iter` for allocating a slice in the `Bump` from
681 an iterator.
682
683 * Added `Bump::alloc_slice_fill_copy` and `Bump::alloc_slice_fill_clone` for
684 creating slices of length `n` that are filled with copies or clones of an
685 initial element.
686
687 * Added `Bump::alloc_slice_fill_default` for creating slices of length `n` with
688 the element type's default instance.
689
690 * Added `Bump::alloc_slice_fill_with` for creating slices of length `n` whose
691 elements are initialized with a function or closure.
692
693 * Added `Bump::iter_allocated_chunks` as a replacement for the old
694 `Bump::each_allocated_chunk`. The `iter_allocated_chunks` version returns an
695 iterator, which is more idiomatic than its old, callback-taking counterpart.
696 Additionally, `iter_allocated_chunks` exposes the chunks as `MaybeUninit`s
697 instead of slices, which makes it usable in more situations without triggering
698 undefined behavior. See also the note about bump direction in the "changed"
699 section; if you're iterating chunks, you're likely affected by that change!
700
701 * Added `Bump::with_capacity` so that you can pre-allocate a chunk with the
702 requested space.
703
704 ### Changed
705
706 * **BREAKING:** The direction we allocate within a chunk has changed. It used to
707 be "upwards", from low addresses within a chunk towards high addresses. It is
708 now "downwards", from high addresses towards lower addresses.
709
710 Additionally, the order in which we iterate over allocated chunks has changed!
711 We used to iterate over chunks from oldest chunk to youngest chunk, and now we
712 do the opposite: the youngest chunks are iterated over first, and the oldest
713 chunks are iterated over last.
714
715 If you were using `Bump::each_allocated_chunk` to iterate over data that you
716 had previously allocated, and *you want to iterate in order of
717 oldest-to-youngest allocation*, you need to reverse the chunks iterator and
718 also reverse the order in which you loop through the data within a chunk!
719
720 For example, if you had this code:
721
722 ```rust
723 unsafe {
724 bump.each_allocated_chunk(|chunk| {
725 for byte in chunk {
726 // Touch each byte in oldest-to-youngest allocation order...
727 }
728 });
729 }
730 ```
731
732 It should become this code:
733
734 ```rust
735 let mut chunks: Vec<_> = bump.iter_allocated_chunks().collect();
736 chunks.reverse();
737 for chunk in chunks {
738 for byte in chunk.iter().rev() {
739 let byte = unsafe { byte.assume_init() };
740 // Touch each byte in oldest-to-youngest allocation order...
741 }
742 }
743 ```
744
745 The good news is that this change yielded a *speed up in allocation throughput
746 of 3-19%!*
747
748 See https://github.com/fitzgen/bumpalo/pull/37 and
749 https://fitzgeraldnick.com/2019/11/01/always-bump-downwards.html for details.
750
751 * **BREAKING:** The `collections` cargo feature is no longer on by default. You
752 must explicitly turn it on if you intend to use the `bumpalo::collections`
753 module.
754
755 * `Bump::reset` will now retain only the last allocated chunk (the biggest),
756 rather than only the first allocated chunk (the smallest). This should enable
757 `Bump` to better adapt to workload sizes and quickly reach a steady state
758 where new chunks are not requested from the global allocator.
759
760 ### Removed
761
762 * The `Bump::each_allocated_chunk` method is removed in favor of
763 `Bump::iter_allocated_chunks`. Note that its safety requirements for reading
764 from the allocated chunks are slightly different from the old
765 `each_allocated_chunk`: only up to 16-byte alignment is supported now. If you
766 allocate anything with greater alignment than that into the bump arena, there
767 might be uninitialized padding inserted in the chunks, and therefore it is no
768 longer safe to read them via `MaybeUninit::assume_init`. See also the note
769 about bump direction in the "changed" section; if you're iterating chunks,
770 you're likely affected by that change!
771
772 * The `std` cargo feature has been removed, since this crate is now always
773 no-std.
774
775 ## Fixed
776
777 * Fixed a bug involving potential integer overflows with large requested
778 allocation sizes.
779
780 --------------------------------------------------------------------------------
781
782 # 2.6.0
783
784 Released 2019-08-19.
785
786 * Implement `Send` for `Bump`.
787
788 --------------------------------------------------------------------------------
789
790 # 2.5.0
791
792 Released 2019-07-01.
793
794 * Add `alloc_slice_copy` and `alloc_slice_clone` methods that allocate space for
795 slices and either copy (with bound `T: Copy`) or clone (with bound `T: Clone`)
796 the provided slice's data into the newly allocated space.
797
798 --------------------------------------------------------------------------------
799
800 # 2.4.3
801
802 Released 2019-05-20.
803
804 * Fixed a bug where chunks were always deallocated with the default chunk
805 layout, not the layout that the chunk was actually allocated with (i.e. if we
806 started growing larger chunks with larger layouts, we would deallocate those
807 chunks with an incorrect layout).
808
809 --------------------------------------------------------------------------------
810
811 # 2.4.2
812
813 Released 2019-05-17.
814
815 * Added an implementation `Default` for `Bump`.
816 * Made it so that if bump allocation within a chunk overflows, we still try to
817 allocate a new chunk to bump out of for the requested allocation. This can
818 avoid some OOMs in scenarios where the chunk we are currently allocating out
819 of is very near the high end of the address space, and there is still
820 available address space lower down for new chunks.
821
822 --------------------------------------------------------------------------------
823
824 # 2.4.1
825
826 Released 2019-04-19.
827
828 * Added readme metadata to Cargo.toml so it shows up on crates.io
829
830 --------------------------------------------------------------------------------
831
832 # 2.4.0
833
834 Released 2019-04-19.
835
836 * Added support for `realloc`ing in-place when the pointer being `realloc`ed is
837 the last allocation made from the bump arena. This should speed up various
838 `String`, `Vec`, and `format!` operations in many cases.
839
840 --------------------------------------------------------------------------------
841
842 # 2.3.0
843
844 Released 2019-03-26.
845
846 * Add the `alloc_with` method, that (usually) avoids stack-allocating the
847 allocated value and then moving it into the bump arena. This avoids potential
848 stack overflows in release mode when allocating very large objects, and also
849 some `memcpy` calls. This is similar to the `copyless` crate. Read [the
850 `alloc_with` doc comments][alloc-with-doc-comments] and [the original issue
851 proposing this API][issue-proposing-alloc-with] for more.
852
853 [alloc-with-doc-comments]: https://github.com/fitzgen/bumpalo/blob/9f47aee8a6839ba65c073b9ad5372aacbbd02352/src/lib.rs#L436-L475
854 [issue-proposing-alloc-with]: https://github.com/fitzgen/bumpalo/issues/10
855
856 --------------------------------------------------------------------------------
857
858 # 2.2.2
859
860 Released 2019-03-18.
861
862 * Fix a regression from 2.2.1 where chunks were not always aligned to the chunk
863 footer's alignment.
864
865 --------------------------------------------------------------------------------
866
867 # 2.2.1
868
869 Released 2019-03-18.
870
871 * Fix a regression in 2.2.0 where newly allocated bump chunks could fail to have
872 capacity for a large requested bump allocation in some corner cases.
873
874 --------------------------------------------------------------------------------
875
876 # 2.2.0
877
878 Released 2019-03-15.
879
880 * Chunks in an arena now start out small, and double in size as more chunks are
881 requested.
882
883 --------------------------------------------------------------------------------
884
885 # 2.1.0
886
887 Released 2019-02-12.
888
889 * Added the `into_bump_slice` method on `bumpalo::collections::Vec<T>`.
890
891 --------------------------------------------------------------------------------
892
893 # 2.0.0
894
895 Released 2019-02-11.
896
897 * Removed the `BumpAllocSafe` trait.
898 * Correctly detect overflows from large allocations and panic.
899
900 --------------------------------------------------------------------------------
901
902 # 1.2.0
903
904 Released 2019-01-15.
905
906 * Fixed an overly-aggressive `debug_assert!` that had false positives.
907 * Ported to Rust 2018 edition.
908
909 --------------------------------------------------------------------------------
910
911 # 1.1.0
912
913 Released 2018-11-28.
914
915 * Added the `collections` module, which contains ports of `std`'s collection
916 types that are compatible with backing their storage in `Bump` arenas.
917 * Lifted the limits on size and alignment of allocations.
918
919 --------------------------------------------------------------------------------
920
921 # 1.0.2
922
923 --------------------------------------------------------------------------------
924
925 # 1.0.1
926
927 --------------------------------------------------------------------------------
928
929 # 1.0.0