evaluation with the recently introduced maximum stack size monitoring revealed
that the actual used stack size was never above 4kB so allocating 1MB stack
for each coroutine is a lot of wasted memory. So reduce the stack size to
64kB which should still give enough head room.

Signed-off-by: Peter Lieven <p...@kamp.de>
---
 util/coroutine-ucontext.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/util/coroutine-ucontext.c b/util/coroutine-ucontext.c
index 27c61f3..7f1d541 100644
--- a/util/coroutine-ucontext.c
+++ b/util/coroutine-ucontext.c
@@ -88,7 +88,7 @@ static void coroutine_trampoline(int i0, int i1)
     }
 }
 
-#define COROUTINE_STACK_SIZE (1 << 20)
+#define COROUTINE_STACK_SIZE (1 << 16)
 
 Coroutine *qemu_coroutine_new(void)
 {
-- 
1.9.1


Reply via email to