From 3cdc978d9d083230c74ca17b35d59217bad126da Mon Sep 17 00:00:00 2001 From: Dusty DeWeese Date: Sat, 16 Jul 2022 14:03:02 -0700 Subject: [PATCH] Revert "Merge #552" This reverts commit ce5336529c7f145ab765b290e09c84e6f928fbd4, reversing changes made to bfb7705989a0961a16386ae2109bc2ef7f0bbe5e. --- crossbeam-epoch/src/internal.rs | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/crossbeam-epoch/src/internal.rs b/crossbeam-epoch/src/internal.rs index de208b13e..67c9c4452 100644 --- a/crossbeam-epoch/src/internal.rs +++ b/crossbeam-epoch/src/internal.rs @@ -55,9 +55,9 @@ use crate::sync::list::{Entry, IsElement, IterError, List}; use crate::sync::queue::Queue; /// Maximum number of objects a bag can contain. -#[cfg(not(crossbeam_sanitize))] -const MAX_OBJECTS: usize = 62; -#[cfg(crossbeam_sanitize)] +#[cfg(not(feature = "sanitize"))] +const MAX_OBJECTS: usize = 64; +#[cfg(feature = "sanitize")] const MAX_OBJECTS: usize = 4; /// A bag of deferred functions. @@ -175,6 +175,8 @@ impl Default for Bag { Deferred::new(no_op_func), Deferred::new(no_op_func), Deferred::new(no_op_func), + Deferred::new(no_op_func), + Deferred::new(no_op_func), ], }; #[cfg(crossbeam_sanitize)] @@ -373,17 +375,6 @@ pub(crate) struct Local { pin_count: Cell>, } -// Make sure `Local` is less than or equal to 2048 bytes. -// https://github.com/crossbeam-rs/crossbeam/issues/551 -#[cfg(not(crossbeam_sanitize))] // `crossbeam_sanitize` reduces the size of `Local` -#[test] -fn local_size() { - assert!( - core::mem::size_of::() <= 2048, - "An allocation of `Local` should be <= 2048 bytes." - ); -} - impl Local { /// Number of pinnings after which a participant will execute some deferred functions from the /// global queue.