Skip to content

Commit

Permalink
Revert "Merge crossbeam-rs#552"
Browse files Browse the repository at this point in the history
This reverts commit ce53365, reversing
changes made to bfb7705.
  • Loading branch information
HackerFoo committed Jul 16, 2022
1 parent 4b949c2 commit 3cdc978
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions crossbeam-epoch/src/internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)]
Expand Down Expand Up @@ -373,17 +375,6 @@ pub(crate) struct Local {
pin_count: Cell<Wrapping<usize>>,
}

// 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::<Local>() <= 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.
Expand Down

0 comments on commit 3cdc978

Please sign in to comment.