stack ws workspace for pcre and others #1576
Poul-Henning Kamp
phk at phk.freebsd.dk
Wed Sep 3 10:13:35 CEST 2014
--------
In message <CAJV_h0ZfT-BwxxLf-ddz1Lb5C+W0SKvFNkKQS79CDMM9ANdnWA at mail.gmail.com>
, Federico Schwindt writes:
+#ifdef HAVE_SIGALTSTACK
+ if (cache_param->sigsegv_handler) {
+ char stackbuf[MINSIGSTKSZ];
+ stack_t ss;
+
+ ss.ss_size = sizeof(stackbuf);
+ ss.ss_sp = stackbuf;
+ ss.ss_flags = 0;
+ (void)sigaltstack(&ss, NULL);
+ }
+#endif
This will ad 2-4 KB to all threads.
Also, I'm not convinced about the wisdom of allocating the sigstack
on the normal stack...
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
More information about the varnish-dev
mailing list