3 needstack \- check for execution stack overflow
14 Stack overflow in the thread library leads to bugs that are
15 difficult to diagnose.
16 The Plan 9 libraries are careful about not allocating
17 large structures on the stack, so typically four or eight kilobytes is plenty of stack
19 Other libraries are not always as careful.
22 indicates to the thread library that an external routine is about
23 to be called that will require
26 If there is not enough space left on the stack,
27 the thread library prints an error and terminates
31 can be used to check whether the stack is
37 so that library functions used in threaded and non-threaded contexts
46 should be thought of as a comment checked at run time,
50 The X Window library implementation of
52 allocates some very large buffers on the stack, so
53 .B \*9/src/cmd/devdraw/x11-itrans.c
56 before making calls to
58 If a thread (in this case, the keyboard-reading thread used
62 does not allocate a large enough stack, the problem is diagnosed
63 immediately rather than left to corrupt memory.
65 .B \*9/src/lib9/needstack.c