[PATCH] lib/core/fiber: Initialize stack_watermark where appropriate

Cyrill Gorcunov gorcunov at gmail.com
Mon Mar 18 20:23:52 MSK 2019


The stack_watermark member declared with HAVE_MADV_DONTNEED wrap,
so need to guard it here the same way.

Fixes 553dc562342a52cb44d74a7521c9c8bec70c96a5
---
 src/lib/core/fiber.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/lib/core/fiber.c b/src/lib/core/fiber.c
index 243a73bf8..b5033a32e 100644
--- a/src/lib/core/fiber.c
+++ b/src/lib/core/fiber.c
@@ -1076,7 +1076,10 @@ cord_create(struct cord *cord, const char *name)
 	cord->sched.stack = NULL;
 	cord->sched.stack_size = 0;
 #endif
+
+#ifdef HAVE_MADV_DONTNEED
 	cord->sched.stack_watermark = NULL;
+#endif
 }
 
 void
-- 
2.20.1




More information about the Tarantool-patches mailing list