tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: refine of the GSOC project

On Thu, May 12, 2016 at 11:13:11PM +0200, Kamil Rytarowski wrote:
> An alternative is to go for 8192 (2*PAGE_SIZE) to mimic MINSIGSTKSZ:
> /usr/include/sys/signal.h:#define    MINSIGSTKSZ    8192            /*
> minimum allowable stack */

But it is not 2 * PAGE_SIZE. On some architectures, that's not even half
a page! What I don't remember and what I am too lazy to look up is: do
we count the guard pages as part of the stack size or not. Depending on
that, the smallest possible stack for a thread is PAGE_SIZE or 3 *
PAGES_SIZE. It should not be a macro as that's not a constant on some
platforms. If POSIX requires such a macro to be provided, it's a bug in
the standard and should be reported as such.


Home | Main Index | Thread Index | Old Index