diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-01-14 19:21:23 -0800 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-01-14 19:24:33 -0800 |
| commit | bc77d7bdb0d76382865c7b5efd1531e7ac8362fc (patch) | |
| tree | ccdb57dbc12bdda5614decb50a3a12a6af25a9ed /src/libcore | |
| parent | b93ed365559b488e81a34bff0b560fd6366e9f13 (diff) | |
| download | rust-bc77d7bdb0d76382865c7b5efd1531e7ac8362fc.tar.gz rust-bc77d7bdb0d76382865c7b5efd1531e7ac8362fc.zip | |
libcore: Add sys::set_min_stack
Adding this back to the library as a stopgap measure to recover some benchmark performance. See #1527.
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/sys.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/libcore/sys.rs b/src/libcore/sys.rs index 96e5947daf0..f022532eefc 100644 --- a/src/libcore/sys.rs +++ b/src/libcore/sys.rs @@ -21,6 +21,7 @@ native mod rustrt { fn unsupervise(); fn shape_log_str<T>(t: *sys::type_desc, data: T) -> str; fn rust_set_exit_status(code: int); + fn set_min_stack(size: uint); } #[abi = "rust-intrinsic"] @@ -105,6 +106,22 @@ fn set_exit_status(code: int) { rustrt::rust_set_exit_status(code); } +// FIXME: #1495 - This shouldn't exist +#[doc( + brief = + "Globally set the minimum size, in bytes, of a stack segment", + desc = + "Rust tasks have segmented stacks that are connected in a linked list \ + allowing them to start very small and grow very large. In some \ + situations this can result in poor performance. Calling this function \ + will set the minimum size of all stack segments allocated in the \ + future, for all tasks." +)] +#[deprecated] +fn set_min_stack(size: uint) { + rustrt::set_min_stack(size); +} + // Local Variables: // mode: rust; // fill-column: 78; |
