coroutine: decrease POOL_BATCH_SIZE for Win32
authorSeokYeon Hwang <syeon.hwang@samsung.com>
Mon, 19 Oct 2015 05:20:25 +0000 (14:20 +0900)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Tue, 20 Oct 2015 04:02:25 +0000 (13:02 +0900)
In 32bit Windows, POOL_BATCH_SIZE == 64 can cause ERROR_NOT_ENOUGH_MEMORY
in CreateFiber() in very busy fiber creation. So we decrease the value to
32 for Win32.

Change-Id: I09d85087f51d696909f732d1589e0efba4c6d699
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
qemu-coroutine.c

index c17a92b..3c768eb 100644 (file)
 #include "block/coroutine_int.h"
 
 enum {
+#if defined(_WIN32) && !defined(_WIN64)
+    POOL_BATCH_SIZE = 32,
+#else
     POOL_BATCH_SIZE = 64,
+#endif
 };
 
 /** Free list to speed up creation */