aboutsummaryrefslogtreecommitdiff
path: root/tests/test_bytes_vec_alloc.rs
diff options
context:
space:
mode:
authorGravatar Sean McArthur <sean@seanmonstar.com> 2019-12-17 13:23:15 -0800
committerGravatar GitHub <noreply@github.com> 2019-12-17 13:23:15 -0800
commitc7cf71618071933eac2c18471427d30e6a630af5 (patch)
treeeb467f28b5bc5b60c427cea7675d08d487301969 /tests/test_bytes_vec_alloc.rs
parent8ae3bb2104fda9a02d55ac5635974ca1b5a49ebb (diff)
downloadbytes-c7cf71618071933eac2c18471427d30e6a630af5.tar.gz
bytes-c7cf71618071933eac2c18471427d30e6a630af5.tar.zst
bytes-c7cf71618071933eac2c18471427d30e6a630af5.zip
Fix Bytes when Vec pointer's LSB is set (#346)
This separates the `SharedVtable` into 3: - `PromotableEvenVtable`: The original `SharedVtable`, which will promote the `Vec` to `Shared` on the first clone, and is selected when the `Vec`'s pointer has the LSB unset. - `PromotableOddVtable`: Similar to the `PromotableEvenVtable`, but selected when the `Vec`'s pointer has the LSB set. This vtable differs in the masking used when reconstructing the `Vec`. - `SharedVtable`: This no longer checks if its current kind is `VEC` or `ARC`, and is only created by the "promotable" vtables. This also adds a test using an "odd" global allocator that purposefully bumps all pointers with alignment of 1. Closes #343
Diffstat (limited to 'tests/test_bytes_vec_alloc.rs')
0 files changed, 0 insertions, 0 deletions