Loading Cargo.lock +2 −2 Original line number Diff line number Diff line Loading @@ -436,9 +436,9 @@ dependencies = [ [[package]] name = "bumpalo" version = "3.4.0" version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e8c087f005730276d1096a652e92a8bacee2e2472bcc9715a74d2bec38b5820" checksum = "9c59e7af012c713f529e7a3ee57ce9b31ddd858d4b512923602f74608b009631" [[package]] name = "byte-tools" Loading third_party/rust/bumpalo/.cargo-checksum.json +1 −1 Original line number Diff line number Diff line {"files":{"CHANGELOG.md":"3610f408c7ea975d47ef18a5a4c7dd03126e6fa75dfce9bd0b48b462e4eb856d","Cargo.toml":"3f7d94adde546d00303245d148031e80466893c494e0ce0895462e61eb55b950","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"65f94e99ddaf4f5d1782a6dae23f35d4293a9a01444a13135a6887017d353cee","README.md":"c241d97e982576d7d9776c9e2fcb42c2a8ab8c419e477d2b6d89a9063a781f49","README.tpl":"ec385000e14590a306855e7893daed0168102f33166bdc1e5cf5fa5599dac03f","azure-pipelines.yml":"b7747e8f16efb79e6af6276bda1dce9f7bc5f1ae5a678fcccf59b7d759134f0d","benches/benches.rs":"8143c1e334b5233124da0bb6c07b923bc467321e320b7eaf07d7105924d2a96d","bumpalo.png":"2ca8dcb837e9cdcb7b290f2a5276145a15fca0c2d81ed09695345471175923a0","ci/install-cargo-readme.yml":"7011fca5618acc8893ade88a112ef21d1a4a23b714c1192889dd58f7dd523315","ci/install-rust.yml":"33208be34b5d4b2c8d2a9ae9a5966e238bd9ba725561f6414a0024077e3ce48d","src/alloc.rs":"399d18423662ed1f402f7c833fcb4ea05719f90e3cc48c41aa890df92c28f8a8","src/boxed.rs":"3fae23f74a735e3e60247597ea0da6f75042a1bcf1ebabef396b42853d5988ef","src/collections/mod.rs":"6061a8499a83f8033f5525cab73f4d5d6090759a42d496fc12fb2b6aa6fcd5ff","src/collections/raw_vec.rs":"11395868cfd0802fab3fe43417751a5755abb516136923e6d8fdbc2f0ff49d19","src/collections/str/lossy.rs":"c5d62b16e01071e2a574ae41ef6693ad12f1e6c786c5d38f7a13ebd6cb23c088","src/collections/str/mod.rs":"d82a8bd417fbf52a589d89a16ea2a0ac4f6ac920c3976ab1f5b6ac0c8493c4f2","src/collections/string.rs":"5e727f6dc6198901765b50c85c91283d2d5908b45bcf91634e50ce360ec49496","src/collections/vec.rs":"ae01db81905fd4b14698fde9250e4698ab68b0aa1a95d9f674ccff6bb0dbddd4","src/lib.rs":"bebcf8798be76cef1d6d4e5672a0c7a456c6e6ee948488e893f605dc0363fed7","tests/alloc_fill.rs":"e9e4a47b6b82de284c958f65e80937f65bc44f884b331721288ae7f95d836806","tests/alloc_with.rs":"67d5020f984ce7a3a8b57935eb5d9d1585772146e4eaaa6c5834e797755ece6e","tests/quickchecks.rs":"0b0b87a86360a760a552818bf38168fd33efed9b9783bc1f86a1ee7abb412a64","tests/readme_up_to_date.rs":"8db3e41d803e2a10307e7e35cb2afa6733e1c39ad34789752a927564bf6795b6","tests/string.rs":"6879e2765bd00e99344a9b0f856d299688d2e74213188c2dada6712bcc22d9a6","tests/tests.rs":"2632fcf974fde16e1faf85e28e1fff97849e4b0650b93cf19518bb963038265c","tests/try_alloc.rs":"1e02c3cd1ae67f8e7bf27126488e1e1a24195ab96dd99ff0c974a0b8c5bea4d0","tests/vec.rs":"cc0d63d494ea3654fbb4e0a9da7ade47af46119f819387a861fa7e56e26fe093","valgrind.supp":"8fdaa3cd177b762ded70c46e00096a91dc0b334fe22e516fe904407608c768fc"},"package":"2e8c087f005730276d1096a652e92a8bacee2e2472bcc9715a74d2bec38b5820"} No newline at end of file {"files":{"CHANGELOG.md":"17692cda9e530e580e3cf44a5104ef9cb684f1779219cb3d6540052d7da5cfa4","Cargo.toml":"2d0d5652ee6a7d940b0610229035474581e0529d0b097eca628012a5c55cf05c","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"65f94e99ddaf4f5d1782a6dae23f35d4293a9a01444a13135a6887017d353cee","README.md":"7d9f55c8067d21305b4beef74fa380845f9c1c1e44de3e30a284d74d26a6f3d6","README.tpl":"ec385000e14590a306855e7893daed0168102f33166bdc1e5cf5fa5599dac03f","benches/benches.rs":"f01a371c0e6725be6a34a52fd30f0e3d3e5b984da6a1dd52d0d3df0cb870cd9c","bumpalo.png":"2ca8dcb837e9cdcb7b290f2a5276145a15fca0c2d81ed09695345471175923a0","src/alloc.rs":"fec6d09d5612012e2de224077ed6d0c57174a874d9a9289603929bfc64caf133","src/boxed.rs":"3fae23f74a735e3e60247597ea0da6f75042a1bcf1ebabef396b42853d5988ef","src/collections/mod.rs":"17721aa95afe171ee7c3b77adfcae16673f42c367e05d2c58badb8b4f9991ea8","src/collections/raw_vec.rs":"11395868cfd0802fab3fe43417751a5755abb516136923e6d8fdbc2f0ff49d19","src/collections/str/lossy.rs":"c5d62b16e01071e2a574ae41ef6693ad12f1e6c786c5d38f7a13ebd6cb23c088","src/collections/str/mod.rs":"d82a8bd417fbf52a589d89a16ea2a0ac4f6ac920c3976ab1f5b6ac0c8493c4f2","src/collections/string.rs":"5d90fc63f0a9e4c40f082f1c0b784404c1221329d9a9e2e38a1a31f61cebabf9","src/collections/vec.rs":"8f445224c914c7a4f532636798f2b6ac254e650aa58aa57bd61aee1003d7f6af","src/lib.rs":"e1c2b3904ddba2e586359941a7256aa6646f47c5ed579ab8139419fa0b3bb253","tests/alloc_fill.rs":"e9e4a47b6b82de284c958f65e80937f65bc44f884b331721288ae7f95d836806","tests/alloc_try_with.rs":"2e8671db1301488d7eb890882e2676490f1fe746102e09d74b27d688300830ed","tests/alloc_with.rs":"b80de1628a2d337f990cb5361c7b6722e3afde5591f6edb248b52e272f5cf278","tests/allocator_api.rs":"b81af74216de38b932ec19bebaa10b01c6e5b4d56b9eb31e959f6560f50f8e55","tests/quickchecks.rs":"0b0b87a86360a760a552818bf38168fd33efed9b9783bc1f86a1ee7abb412a64","tests/readme_up_to_date.rs":"8db3e41d803e2a10307e7e35cb2afa6733e1c39ad34789752a927564bf6795b6","tests/string.rs":"6879e2765bd00e99344a9b0f856d299688d2e74213188c2dada6712bcc22d9a6","tests/tests.rs":"2632fcf974fde16e1faf85e28e1fff97849e4b0650b93cf19518bb963038265c","tests/try_alloc.rs":"d1ba1e2196241179cabf2600ab2e419606c64364c05710e25618cd1dc2bb9004","tests/try_alloc_try_with.rs":"79e33a00d709887936836ced6ebce1a924e45dc62581f8e2acfbe3f9c4b4b77d","tests/try_alloc_with.rs":"a504b08eddf6b53cf274e99d8ba34dcf78912c34ee923900f5227cd3966a8df9","tests/vec.rs":"cc0d63d494ea3654fbb4e0a9da7ade47af46119f819387a861fa7e56e26fe093","valgrind.supp":"74457b5cc24d98ea349a73ab91ee9e898e8442148a4919cf046a02b1fe648b18"},"package":"9c59e7af012c713f529e7a3ee57ce9b31ddd858d4b512923602f74608b009631"} No newline at end of file third_party/rust/bumpalo/CHANGELOG.md +116 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,122 @@ Released YYYY-MM-DD. -------------------------------------------------------------------------------- ## 3.7.0 Released 2020-05-28. ### Added * Added `Borrow` and `BorrowMut` trait implementations for `bumpalo::collections::Vec` and `bumpalo::collections::String`. [#108](https://github.com/fitzgen/bumpalo/pull/108) ### Changed * When allocating a new chunk fails, don't immediately give up. Instead, try allocating a chunk that is half that size, and if that fails, then try half of *that* size, etc until either we successfully allocate a chunk or we fail to allocate the minimum chunk size and then finally give up. [#111](https://github.com/fitzgen/bumpalo/pull/111) -------------------------------------------------------------------------------- ## 3.6.1 Released 2020-02-18. ### Added * Improved performance of `Bump`'s `Allocator::grow_zeroed` trait method implementation. [#99](https://github.com/fitzgen/bumpalo/pull/99) -------------------------------------------------------------------------------- ## 3.6.0 Released 2020-01-29. ### Added * Added a few new flavors of allocation: * `try_alloc` for fallible, by-value allocation * `try_alloc_with` for fallible allocation with an infallible initializer function * `alloc_try_with` for infallible allocation with a fallible initializer function * `try_alloc_try_with` method for fallible allocation with a fallible initializer function We already have infallible, by-value allocation (`alloc`) and infallible allocation with an infallible initializer (`alloc_with`). With these new methods, we now have every combination covered. Thanks to [Tamme Schichler](https://github.com/Tamschi) for contributing these methods! -------------------------------------------------------------------------------- ## 3.5.0 Released 2020-01-22. ### Added * Added experimental, unstable support for the unstable, nightly Rust `allocator_api` feature. The `allocator_api` feature defines an `Allocator` trait and exposes custom allocators for `std` types. Bumpalo has a matching `allocator_api` cargo feature to enable implementing `Allocator` and using `Bump` with `std` collections. First, enable the `allocator_api` feature in your `Cargo.toml`: ```toml [dependencies] bumpalo = { version = "3.4.0", features = ["allocator_api"] } ``` Next, enable the `allocator_api` nightly Rust feature in your `src/lib.rs` or `src/main.rs`: ```rust # #[cfg(feature = "allocator_api")] # { #![feature(allocator_api)] # } ``` Finally, use `std` collections with `Bump`, so that their internal heap allocations are made within the given bump arena: ``` # #![cfg_attr(feature = "allocator_api", feature(allocator_api))] # #[cfg(feature = "allocator_api")] # { #![feature(allocator_api)] use bumpalo::Bump; // Create a new bump arena. let bump = Bump::new(); // Create a `Vec` whose elements are allocated within the bump arena. let mut v = Vec::new_in(&bump); v.push(0); v.push(1); v.push(2); # } ``` I'm very excited to see custom allocators in `std` coming along! Thanks to Arthur Gautier for implementing support for the `allocator_api` feature for Bumpalo. -------------------------------------------------------------------------------- ## 3.4.0 Released 2020-06-01. Loading third_party/rust/bumpalo/Cargo.toml +2 −1 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ [package] edition = "2018" name = "bumpalo" version = "3.4.0" version = "3.7.0" authors = ["Nick Fitzgerald <fitzgen@gmail.com>"] description = "A fast bump allocation arena for Rust." documentation = "https://docs.rs/bumpalo" Loading Loading @@ -48,6 +48,7 @@ version = "0.9.0" version = "0.7" [features] allocator_api = [] boxed = [] collections = [] default = [] third_party/rust/bumpalo/README.md +62 −1 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ [](https://docs.rs/bumpalo/) [](https://crates.io/crates/bumpalo) [](https://crates.io/crates/bumpalo) [](https://dev.azure.com/fitzgen/bumpalo/_build/latest?definitionId=2&branchName=master) [](https://github.com/fitzgen/bumpalo/actions?query=workflow%3ARust)  Loading Loading @@ -67,7 +67,9 @@ let scooter = bump.alloc(Doggo { scritches_required: true, }); // Exclusive, mutable references to the just-allocated value are returned. assert!(scooter.scritches_required); scooter.age += 1; ``` ### Collections Loading Loading @@ -98,6 +100,9 @@ Eventually [all `std` collection types will be parameterized by an allocator](https://github.com/rust-lang/rust/issues/42774) and we can remove this `collections` module and use the `std` versions. For unstable, nightly-only support for custom allocators in `std`, see the `allocator_api` section below. ### `bumpalo::boxed::Box` When the `"boxed"` cargo feature is enabled, a fork of `std::boxed::Box` library Loading Loading @@ -142,3 +147,59 @@ assert_eq!(NUM_DROPPED.load(Ordering::SeqCst), 1); Bumpalo is a `no_std` crate. It depends only on the `alloc` and `core` crates. ### Thread support The `Bump` is `!Send`, which makes it hard to use in certain situations around threads ‒ for example in `rayon`. The [`bumpalo-herd`](https://crates.io/crates/bumpalo-herd) crate provides a pool of `Bump` allocators for use in such situations. ### Nightly Rust `feature(allocator_api)` Support The unstable, nightly-only Rust `allocator_api` feature defines an `Allocator` trait and exposes custom allocators for `std` types. Bumpalo has a matching `allocator_api` cargo feature to enable implementing `Allocator` and using `Bump` with `std` collections. Note that, as `feature(allocator_api)` is unstable and only in nightly Rust, Bumpalo's matching `allocator_api` cargo feature should be considered unstable, and will not follow the semver conventions that the rest of the crate does. First, enable the `allocator_api` feature in your `Cargo.toml`: ```toml [dependencies] bumpalo = { version = "3.4.0", features = ["allocator_api"] } ``` Next, enable the `allocator_api` nightly Rust feature in your `src/lib.rs` or `src/main.rs`: ```rust #![feature(allocator_api)] ``` Finally, use `std` collections with `Bump`, so that their internal heap allocations are made within the given bump arena: ```rust #![feature(allocator_api)] use bumpalo::Bump; // Create a new bump arena. let bump = Bump::new(); // Create a `Vec` whose elements are allocated within the bump arena. let mut v = Vec::new_in(&bump); v.push(0); v.push(1); v.push(2); ``` #### Minimum Supported Rust Version (MSRV) This crate is guaranteed to compile on stable Rust 1.44 and up. It might compile with older versions but that may change in any new patch release. We reserve the right to increment the MSRV on minor releases, however we will strive to only do it deliberately and for good reasons. Loading
Cargo.lock +2 −2 Original line number Diff line number Diff line Loading @@ -436,9 +436,9 @@ dependencies = [ [[package]] name = "bumpalo" version = "3.4.0" version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e8c087f005730276d1096a652e92a8bacee2e2472bcc9715a74d2bec38b5820" checksum = "9c59e7af012c713f529e7a3ee57ce9b31ddd858d4b512923602f74608b009631" [[package]] name = "byte-tools" Loading
third_party/rust/bumpalo/.cargo-checksum.json +1 −1 Original line number Diff line number Diff line {"files":{"CHANGELOG.md":"3610f408c7ea975d47ef18a5a4c7dd03126e6fa75dfce9bd0b48b462e4eb856d","Cargo.toml":"3f7d94adde546d00303245d148031e80466893c494e0ce0895462e61eb55b950","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"65f94e99ddaf4f5d1782a6dae23f35d4293a9a01444a13135a6887017d353cee","README.md":"c241d97e982576d7d9776c9e2fcb42c2a8ab8c419e477d2b6d89a9063a781f49","README.tpl":"ec385000e14590a306855e7893daed0168102f33166bdc1e5cf5fa5599dac03f","azure-pipelines.yml":"b7747e8f16efb79e6af6276bda1dce9f7bc5f1ae5a678fcccf59b7d759134f0d","benches/benches.rs":"8143c1e334b5233124da0bb6c07b923bc467321e320b7eaf07d7105924d2a96d","bumpalo.png":"2ca8dcb837e9cdcb7b290f2a5276145a15fca0c2d81ed09695345471175923a0","ci/install-cargo-readme.yml":"7011fca5618acc8893ade88a112ef21d1a4a23b714c1192889dd58f7dd523315","ci/install-rust.yml":"33208be34b5d4b2c8d2a9ae9a5966e238bd9ba725561f6414a0024077e3ce48d","src/alloc.rs":"399d18423662ed1f402f7c833fcb4ea05719f90e3cc48c41aa890df92c28f8a8","src/boxed.rs":"3fae23f74a735e3e60247597ea0da6f75042a1bcf1ebabef396b42853d5988ef","src/collections/mod.rs":"6061a8499a83f8033f5525cab73f4d5d6090759a42d496fc12fb2b6aa6fcd5ff","src/collections/raw_vec.rs":"11395868cfd0802fab3fe43417751a5755abb516136923e6d8fdbc2f0ff49d19","src/collections/str/lossy.rs":"c5d62b16e01071e2a574ae41ef6693ad12f1e6c786c5d38f7a13ebd6cb23c088","src/collections/str/mod.rs":"d82a8bd417fbf52a589d89a16ea2a0ac4f6ac920c3976ab1f5b6ac0c8493c4f2","src/collections/string.rs":"5e727f6dc6198901765b50c85c91283d2d5908b45bcf91634e50ce360ec49496","src/collections/vec.rs":"ae01db81905fd4b14698fde9250e4698ab68b0aa1a95d9f674ccff6bb0dbddd4","src/lib.rs":"bebcf8798be76cef1d6d4e5672a0c7a456c6e6ee948488e893f605dc0363fed7","tests/alloc_fill.rs":"e9e4a47b6b82de284c958f65e80937f65bc44f884b331721288ae7f95d836806","tests/alloc_with.rs":"67d5020f984ce7a3a8b57935eb5d9d1585772146e4eaaa6c5834e797755ece6e","tests/quickchecks.rs":"0b0b87a86360a760a552818bf38168fd33efed9b9783bc1f86a1ee7abb412a64","tests/readme_up_to_date.rs":"8db3e41d803e2a10307e7e35cb2afa6733e1c39ad34789752a927564bf6795b6","tests/string.rs":"6879e2765bd00e99344a9b0f856d299688d2e74213188c2dada6712bcc22d9a6","tests/tests.rs":"2632fcf974fde16e1faf85e28e1fff97849e4b0650b93cf19518bb963038265c","tests/try_alloc.rs":"1e02c3cd1ae67f8e7bf27126488e1e1a24195ab96dd99ff0c974a0b8c5bea4d0","tests/vec.rs":"cc0d63d494ea3654fbb4e0a9da7ade47af46119f819387a861fa7e56e26fe093","valgrind.supp":"8fdaa3cd177b762ded70c46e00096a91dc0b334fe22e516fe904407608c768fc"},"package":"2e8c087f005730276d1096a652e92a8bacee2e2472bcc9715a74d2bec38b5820"} No newline at end of file {"files":{"CHANGELOG.md":"17692cda9e530e580e3cf44a5104ef9cb684f1779219cb3d6540052d7da5cfa4","Cargo.toml":"2d0d5652ee6a7d940b0610229035474581e0529d0b097eca628012a5c55cf05c","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"65f94e99ddaf4f5d1782a6dae23f35d4293a9a01444a13135a6887017d353cee","README.md":"7d9f55c8067d21305b4beef74fa380845f9c1c1e44de3e30a284d74d26a6f3d6","README.tpl":"ec385000e14590a306855e7893daed0168102f33166bdc1e5cf5fa5599dac03f","benches/benches.rs":"f01a371c0e6725be6a34a52fd30f0e3d3e5b984da6a1dd52d0d3df0cb870cd9c","bumpalo.png":"2ca8dcb837e9cdcb7b290f2a5276145a15fca0c2d81ed09695345471175923a0","src/alloc.rs":"fec6d09d5612012e2de224077ed6d0c57174a874d9a9289603929bfc64caf133","src/boxed.rs":"3fae23f74a735e3e60247597ea0da6f75042a1bcf1ebabef396b42853d5988ef","src/collections/mod.rs":"17721aa95afe171ee7c3b77adfcae16673f42c367e05d2c58badb8b4f9991ea8","src/collections/raw_vec.rs":"11395868cfd0802fab3fe43417751a5755abb516136923e6d8fdbc2f0ff49d19","src/collections/str/lossy.rs":"c5d62b16e01071e2a574ae41ef6693ad12f1e6c786c5d38f7a13ebd6cb23c088","src/collections/str/mod.rs":"d82a8bd417fbf52a589d89a16ea2a0ac4f6ac920c3976ab1f5b6ac0c8493c4f2","src/collections/string.rs":"5d90fc63f0a9e4c40f082f1c0b784404c1221329d9a9e2e38a1a31f61cebabf9","src/collections/vec.rs":"8f445224c914c7a4f532636798f2b6ac254e650aa58aa57bd61aee1003d7f6af","src/lib.rs":"e1c2b3904ddba2e586359941a7256aa6646f47c5ed579ab8139419fa0b3bb253","tests/alloc_fill.rs":"e9e4a47b6b82de284c958f65e80937f65bc44f884b331721288ae7f95d836806","tests/alloc_try_with.rs":"2e8671db1301488d7eb890882e2676490f1fe746102e09d74b27d688300830ed","tests/alloc_with.rs":"b80de1628a2d337f990cb5361c7b6722e3afde5591f6edb248b52e272f5cf278","tests/allocator_api.rs":"b81af74216de38b932ec19bebaa10b01c6e5b4d56b9eb31e959f6560f50f8e55","tests/quickchecks.rs":"0b0b87a86360a760a552818bf38168fd33efed9b9783bc1f86a1ee7abb412a64","tests/readme_up_to_date.rs":"8db3e41d803e2a10307e7e35cb2afa6733e1c39ad34789752a927564bf6795b6","tests/string.rs":"6879e2765bd00e99344a9b0f856d299688d2e74213188c2dada6712bcc22d9a6","tests/tests.rs":"2632fcf974fde16e1faf85e28e1fff97849e4b0650b93cf19518bb963038265c","tests/try_alloc.rs":"d1ba1e2196241179cabf2600ab2e419606c64364c05710e25618cd1dc2bb9004","tests/try_alloc_try_with.rs":"79e33a00d709887936836ced6ebce1a924e45dc62581f8e2acfbe3f9c4b4b77d","tests/try_alloc_with.rs":"a504b08eddf6b53cf274e99d8ba34dcf78912c34ee923900f5227cd3966a8df9","tests/vec.rs":"cc0d63d494ea3654fbb4e0a9da7ade47af46119f819387a861fa7e56e26fe093","valgrind.supp":"74457b5cc24d98ea349a73ab91ee9e898e8442148a4919cf046a02b1fe648b18"},"package":"9c59e7af012c713f529e7a3ee57ce9b31ddd858d4b512923602f74608b009631"} No newline at end of file
third_party/rust/bumpalo/CHANGELOG.md +116 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,122 @@ Released YYYY-MM-DD. -------------------------------------------------------------------------------- ## 3.7.0 Released 2020-05-28. ### Added * Added `Borrow` and `BorrowMut` trait implementations for `bumpalo::collections::Vec` and `bumpalo::collections::String`. [#108](https://github.com/fitzgen/bumpalo/pull/108) ### Changed * When allocating a new chunk fails, don't immediately give up. Instead, try allocating a chunk that is half that size, and if that fails, then try half of *that* size, etc until either we successfully allocate a chunk or we fail to allocate the minimum chunk size and then finally give up. [#111](https://github.com/fitzgen/bumpalo/pull/111) -------------------------------------------------------------------------------- ## 3.6.1 Released 2020-02-18. ### Added * Improved performance of `Bump`'s `Allocator::grow_zeroed` trait method implementation. [#99](https://github.com/fitzgen/bumpalo/pull/99) -------------------------------------------------------------------------------- ## 3.6.0 Released 2020-01-29. ### Added * Added a few new flavors of allocation: * `try_alloc` for fallible, by-value allocation * `try_alloc_with` for fallible allocation with an infallible initializer function * `alloc_try_with` for infallible allocation with a fallible initializer function * `try_alloc_try_with` method for fallible allocation with a fallible initializer function We already have infallible, by-value allocation (`alloc`) and infallible allocation with an infallible initializer (`alloc_with`). With these new methods, we now have every combination covered. Thanks to [Tamme Schichler](https://github.com/Tamschi) for contributing these methods! -------------------------------------------------------------------------------- ## 3.5.0 Released 2020-01-22. ### Added * Added experimental, unstable support for the unstable, nightly Rust `allocator_api` feature. The `allocator_api` feature defines an `Allocator` trait and exposes custom allocators for `std` types. Bumpalo has a matching `allocator_api` cargo feature to enable implementing `Allocator` and using `Bump` with `std` collections. First, enable the `allocator_api` feature in your `Cargo.toml`: ```toml [dependencies] bumpalo = { version = "3.4.0", features = ["allocator_api"] } ``` Next, enable the `allocator_api` nightly Rust feature in your `src/lib.rs` or `src/main.rs`: ```rust # #[cfg(feature = "allocator_api")] # { #![feature(allocator_api)] # } ``` Finally, use `std` collections with `Bump`, so that their internal heap allocations are made within the given bump arena: ``` # #![cfg_attr(feature = "allocator_api", feature(allocator_api))] # #[cfg(feature = "allocator_api")] # { #![feature(allocator_api)] use bumpalo::Bump; // Create a new bump arena. let bump = Bump::new(); // Create a `Vec` whose elements are allocated within the bump arena. let mut v = Vec::new_in(&bump); v.push(0); v.push(1); v.push(2); # } ``` I'm very excited to see custom allocators in `std` coming along! Thanks to Arthur Gautier for implementing support for the `allocator_api` feature for Bumpalo. -------------------------------------------------------------------------------- ## 3.4.0 Released 2020-06-01. Loading
third_party/rust/bumpalo/Cargo.toml +2 −1 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ [package] edition = "2018" name = "bumpalo" version = "3.4.0" version = "3.7.0" authors = ["Nick Fitzgerald <fitzgen@gmail.com>"] description = "A fast bump allocation arena for Rust." documentation = "https://docs.rs/bumpalo" Loading Loading @@ -48,6 +48,7 @@ version = "0.9.0" version = "0.7" [features] allocator_api = [] boxed = [] collections = [] default = []
third_party/rust/bumpalo/README.md +62 −1 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ [](https://docs.rs/bumpalo/) [](https://crates.io/crates/bumpalo) [](https://crates.io/crates/bumpalo) [](https://dev.azure.com/fitzgen/bumpalo/_build/latest?definitionId=2&branchName=master) [](https://github.com/fitzgen/bumpalo/actions?query=workflow%3ARust)  Loading Loading @@ -67,7 +67,9 @@ let scooter = bump.alloc(Doggo { scritches_required: true, }); // Exclusive, mutable references to the just-allocated value are returned. assert!(scooter.scritches_required); scooter.age += 1; ``` ### Collections Loading Loading @@ -98,6 +100,9 @@ Eventually [all `std` collection types will be parameterized by an allocator](https://github.com/rust-lang/rust/issues/42774) and we can remove this `collections` module and use the `std` versions. For unstable, nightly-only support for custom allocators in `std`, see the `allocator_api` section below. ### `bumpalo::boxed::Box` When the `"boxed"` cargo feature is enabled, a fork of `std::boxed::Box` library Loading Loading @@ -142,3 +147,59 @@ assert_eq!(NUM_DROPPED.load(Ordering::SeqCst), 1); Bumpalo is a `no_std` crate. It depends only on the `alloc` and `core` crates. ### Thread support The `Bump` is `!Send`, which makes it hard to use in certain situations around threads ‒ for example in `rayon`. The [`bumpalo-herd`](https://crates.io/crates/bumpalo-herd) crate provides a pool of `Bump` allocators for use in such situations. ### Nightly Rust `feature(allocator_api)` Support The unstable, nightly-only Rust `allocator_api` feature defines an `Allocator` trait and exposes custom allocators for `std` types. Bumpalo has a matching `allocator_api` cargo feature to enable implementing `Allocator` and using `Bump` with `std` collections. Note that, as `feature(allocator_api)` is unstable and only in nightly Rust, Bumpalo's matching `allocator_api` cargo feature should be considered unstable, and will not follow the semver conventions that the rest of the crate does. First, enable the `allocator_api` feature in your `Cargo.toml`: ```toml [dependencies] bumpalo = { version = "3.4.0", features = ["allocator_api"] } ``` Next, enable the `allocator_api` nightly Rust feature in your `src/lib.rs` or `src/main.rs`: ```rust #![feature(allocator_api)] ``` Finally, use `std` collections with `Bump`, so that their internal heap allocations are made within the given bump arena: ```rust #![feature(allocator_api)] use bumpalo::Bump; // Create a new bump arena. let bump = Bump::new(); // Create a `Vec` whose elements are allocated within the bump arena. let mut v = Vec::new_in(&bump); v.push(0); v.push(1); v.push(2); ``` #### Minimum Supported Rust Version (MSRV) This crate is guaranteed to compile on stable Rust 1.44 and up. It might compile with older versions but that may change in any new patch release. We reserve the right to increment the MSRV on minor releases, however we will strive to only do it deliberately and for good reasons.