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

Add a crate attribute to specifiy the size of the main stack #3405

Closed
brson opened this issue Sep 7, 2012 · 4 comments
Closed

Add a crate attribute to specifiy the size of the main stack #3405

brson opened this issue Sep 7, 2012 · 4 comments
Labels
A-codegen Area: Code generation A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows C-enhancement Category: An issue proposing an enhancement or a PR with one.

Comments

@brson
Copy link
Contributor

brson commented Sep 7, 2012

#[main_stack_size = 1000000]

This will specify the size of the initial stack segment. Needed mostly for benchmarks. We'll need to refactor rust_start a bit.

@brson
Copy link
Contributor Author

brson commented Apr 29, 2013

I'm not currently convinced this is necessary. We have the #[fixed_stack_segment] attribute that can be applied to main, at the expense of one extra allocation compared to the proposed main_stack_size attribute. This strikes me as fine for now. If a microbenchmark cares about that allocation then it would probably just prefer to disable the entire runtime.

@msullivan
Copy link
Contributor

Do we want to close this, then?

@msullivan
Copy link
Contributor

Related to #5768, it seems.

@catamorphism
Copy link
Contributor

This seems like #5768 would subsume it, and #5768 has more discussion so I'm closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-codegen Area: Code generation A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows C-enhancement Category: An issue proposing an enhancement or a PR with one.
Projects
None yet
Development

No branches or pull requests

3 participants