Cyril Guibourg <cg+milter-greylist@...> wrote: > #define THREAD_STACK_SIZE 5*1024*1024 How portable is that? pthread_attr_setstacksize() is in the POSIX standards, so it seems the way to go, but unfortunately, thread creation occurs in libmilter, so there is no opportunity to use pthread_attr_setstacksize(). Except if I use a dedicated thread for config reload. OTOH, I can't find anything about THREAD_STACK_SIZE. Is it documented in any standard at all? > I will try this on milter-greylist asap. Anyway, do you have a mean to figure > out how large shall be the stack ? Not really. On your machine, on config file reload, it reaches 4.4MB. I'd say that 5MB is okay, but it might depends on the config file. It also depends on the libpthread implementation. 4.4MB is really big. I wonder what consumes that much stack memory. I'd like to track down stack memory waste, but when running with pthreads, it can be difficult. Anyone went there already? -- Emmanuel Dreyfus Il y a 10 sortes de personnes dans le monde: ceux qui comprennent le binaire et ceux qui ne le comprennent pas. manu@...
Message
Re: [milter-greylist] Config reload SIGSEGV in the spotlight
2004-05-29 by manu@netbsd.org
Attachments
- No local attachments were found for this message.