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

~, ~[] and ~str not containing @ shouldn't have gc headers #5026

Closed
thestinger opened this issue Feb 19, 2013 · 6 comments
Closed

~, ~[] and ~str not containing @ shouldn't have gc headers #5026

thestinger opened this issue Feb 19, 2013 · 6 comments
Labels
A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows I-slow Issue: Problems and improvements with respect to performance of generated code.

Comments

@thestinger
Copy link
Contributor

There's a 4-word header added to every owned pointer right now:

struct rust_opaque_box {
    ref_cnt_t ref_count;
    type_desc *td;
    rust_opaque_box *prev;
    rust_opaque_box *next;
};
@catamorphism
Copy link
Contributor

Not critical for 0.7. Nominating for milestone 5 (production-ready).

@graydon
Copy link
Contributor

graydon commented May 2, 2013

Yeah, performance sadness is a production ready thing. Accepted.

@emberian
Copy link
Member

emberian commented Jul 1, 2013

This is recently in progress by @thestinger

@thestinger
Copy link
Contributor Author

I landed #7495 and #7521 with the initial work on this. There's no longer anything reading/writing to the exchange allocation headers (on ~T and ~[]) and they are no longer initialized.

I really don't know enough about trans to finish this off by myself. I have work started here: https://github.com/thestinger/rust/commits/vec but I'm not having much luck tracking down and fixing the remaining issues.

@graydon
Copy link
Contributor

graydon commented Jul 3, 2013

Track me down more often once we've got 0.7 out, I know a lot of the awkward bits on this

@thestinger
Copy link
Contributor Author

This is now done for ~T. I'm going to open a new bug about ~[]/~str (already have #7496 for ~fn).

bors added a commit to rust-lang-ci/rust that referenced this issue May 2, 2020
…ring-fences, r=phansch

Detect usage of invalid atomic ordering in memory fences

Detect usage of `core::sync::atomic::{fence, compiler_fence}` with `Ordering::Relaxed` and suggest valid alternatives.

changelog: Extend `invalid_atomic_ordering` to lint memory fences

Fixes rust-lang#5026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows I-slow Issue: Problems and improvements with respect to performance of generated code.
Projects
None yet
Development

No branches or pull requests

4 participants