From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Mon, 18 Mar 2019 20:52:46 +0300 From: Vladimir Davydov Subject: Re: [PATCH] lib/core/fiber: Initialize stack_watermark where appropriate Message-ID: <20190318175246.22utl4hoc3jnxuk2@esperanza> References: <20190318172352.14128-1-gorcunov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190318172352.14128-1-gorcunov@gmail.com> To: Cyrill Gorcunov Cc: tml List-ID: 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