[PATCH] lib/core/fiber: Initialize stack_watermark where appropriate
Vladimir Davydov
vdavydov.dev at gmail.com
Mon Mar 18 20:52:46 MSK 2019
On Mon, Mar 18, 2019 at 08:23:52PM +0300, Cyrill Gorcunov wrote:
> The stack_watermark member declared with HAVE_MADV_DONTNEED wrap,
> so need to guard it here the same way.
Yep, overlooked it, my bad. I also lost fiber_stack_recycle() stub.
Weird, but it did compile on OS X as is. Looks like OS X supports
MADV_DONTNEED after all :)
Applied to 2.1 and 1.10 with fiber_stack_recycle() fix squashed.
Thanks!
>
> 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
More information about the Tarantool-patches
mailing list