Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

channel: Create list::Block directly on the heap #1146

Merged
merged 1 commit into from
Nov 8, 2024

Conversation

cuviper
Copy link
Contributor

@cuviper cuviper commented Nov 7, 2024

The list channel's Block::new was causing a stack overflow because it
held 32 item slots, instantiated on the stack before moving to
Box::new. The 32x multiplier made modestly-large item sizes untenable.

That block is now initialized directly on the heap.

References from the std channel implementation:

The list channel's `Block::new` was causing a stack overflow because it
held 32 item slots, instantiated on the stack before moving to
`Box::new`. The 32x multiplier made modestly-large item sizes untenable.

That block is now initialized directly on the heap.

References from the `std` channel implementation:
* rust-lang/rust#102246
* rust-lang/rust#132738
Copy link
Member

@taiki-e taiki-e left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@taiki-e taiki-e merged commit d2c53ef into crossbeam-rs:master Nov 8, 2024
23 checks passed
taiki-e pushed a commit that referenced this pull request Dec 15, 2024
The list channel's `Block::new` was causing a stack overflow because it
held 32 item slots, instantiated on the stack before moving to
`Box::new`. The 32x multiplier made modestly-large item sizes untenable.

That block is now initialized directly on the heap.

References from the `std` channel implementation:
* rust-lang/rust#102246
* rust-lang/rust#132738
taiki-e added a commit that referenced this pull request Dec 15, 2024
taiki-e added a commit that referenced this pull request Dec 15, 2024
taiki-e added a commit that referenced this pull request Dec 15, 2024
taiki-e pushed a commit that referenced this pull request Dec 15, 2024
The list channel's `Block::new` was causing a stack overflow because it
held 32 item slots, instantiated on the stack before moving to
`Box::new`. The 32x multiplier made modestly-large item sizes untenable.

That block is now initialized directly on the heap.

References from the `std` channel implementation:
* rust-lang/rust#102246
* rust-lang/rust#132738
taiki-e added a commit that referenced this pull request Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants