Tim Roberts wrote:
On Tue, 08 Jul 2003 10:13:06 -0300, mnicolet wrote:
So, my true question comes into scene. The people who ported XFree86 to QNX 4.x setted the stack size hint to the Watcom linker to 4 Mb ( yes, 4 Mb ) for the server. I am wondering why a so high figure.

I am wondering (1) why this figure seems high to you, and (2) why you are worried about it? The stack doesn't actually use 4MB of physical memory. It only uses the memory that is required.


X11 is a thoroughly modular and layered server. It nests extremely deeply -- much more deeply than a typical application. I'm not saying 4MB is absolutely necessary, but if cutting it to 1MB causes even a single crash, what's the point?

Is there a true need for such stack size ?

Who cares?

Is QNX a threaded OS (like Netware)?


Threaded applications on x86 usually have much smaller default stack limits, averaging 64-128k, because all threads must share the same address space, and a 4MB stack gives you a theoretical limit of only 1024 threads (assuming your kernel uses no memory and your process allocates no data, just stack :)

mnicolet: the best way to answer your question "Is there a true need for such stack size" is probably for you to set the stack size lower and see if it breaks.

--
        Dan Nelson
        [EMAIL PROTECTED]


_______________________________________________ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel

Reply via email to