From f903ae9e72ec02539373da22fd4d025422af7554 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Fri, 29 Mar 2013 16:55:04 -0700 Subject: librustc: Implement fast-ffi and use it in various places --- src/rt/rust_task.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/rt/rust_task.cpp') 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; -- cgit 1.4.1-3-g733a5