diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2013-03-29 16:55:04 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2013-04-19 11:53:31 -0700 |
| commit | f903ae9e72ec02539373da22fd4d025422af7554 (patch) | |
| tree | ccaf3a5daf113fc468c2e2a00ee10e6034a8ceb5 /src/rt/rust_task.cpp | |
| parent | 1a36b0f17ef0b59411981fdd25ac9ce4ba7e20e0 (diff) | |
| download | rust-f903ae9e72ec02539373da22fd4d025422af7554.tar.gz rust-f903ae9e72ec02539373da22fd4d025422af7554.zip | |
librustc: Implement fast-ffi and use it in various places
Diffstat (limited to 'src/rt/rust_task.cpp')
| -rw-r--r-- | src/rt/rust_task.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp index 63dc1c9833e..021811ffa76 100644 --- a/src/rt/rust_task.cpp +++ b/src/rt/rust_task.cpp @@ -457,8 +457,9 @@ rust_task::get_next_stack_size(size_t min, size_t current, size_t requested) { "min: %" PRIdPTR " current: %" PRIdPTR " requested: %" PRIdPTR, min, current, requested); - // Allocate at least enough to accomodate the next frame - size_t sz = std::max(min, requested); + // Allocate at least enough to accomodate the next frame, plus a little + // slack to avoid thrashing + size_t sz = std::max(min, requested + (requested / 2)); // And double the stack size each allocation const size_t max = 1024 * 1024; |
