Stack limit

Stack limit

Post by Naohiko Shimi » Thu, 27 Jan 2000 04:00:00



The stack limit is set in the
/usr/src/linux/include/asm-alpha/resources.h

I found that the definition was corrected in some architectures.
But for alpha the limit is set wrong.
Where sould I contact to correct the file?

I will show the grep result of _STK_LIM in the 2.2.14 source.

asm-alpha/resource.h:    {_STK_LIM, _STK_LIM},                  /* RLIMIT_STACK */      \
asm-arm/resource.h:     { _STK_LIM, _STK_LIM },                         \
asm-i386/resource.h:    { _STK_LIM, LONG_MAX },                         \
asm-m68k/resource.h:  {_STK_LIM, LONG_MAX}, \
asm-mips/resource.h:    {_STK_LIM, _STK_LIM},                           \
asm-ppc/resource.h:    {_STK_LIM, LONG_MAX},                    /* RLIMIT_STACK */      \
asm-s390/resource.h:    { _STK_LIM, LONG_MAX },                         \
asm-sparc/resource.h:    {LONG_MAX, LONG_MAX}, {_STK_LIM, LONG_MAX},           \
asm-sparc64/resource.h:    {LONG_MAX, LONG_MAX}, {_STK_LIM, LONG_MAX},         \
asm/resource.h:    {_STK_LIM, _STK_LIM},                        /* RLIMIT_STACK */      \

The RLMIIT_STACK sould _STK_LIM, LONG_MAX but in some architectures

The RLMIIT_STACK sould _STK_LIM, LONG_MAX but in some architectures
it is _STK_LIM,_STK_LIM.
It forces users not to use more than 8MB of stack area.

Thank you in advance,

Naohiko Shimizu
Dept. Communication Engr./Univ. TOKAI.
1117 Kitakaname Hiratsuka 259-12 Japan
TEL.+81-463-58-1211(ext. 4084) FAX.+81-463-58-8320
<URL http://shimizu-lab.et.u-tokai.ac.jp/>

 
 
 

1. Kernel stack limit?

Hello all-

I'm new to (Free)BSD programming, so this may be a dumb question.

Is there a limit to the stack space available to functions
within the kernel?  Occasionally I'll see a nasty bug where as
soon as a function is entered, the kernel double faults.

If I then reduce the amount of stack space required by the
function (by allocating some variables on the heap, or
breaking the function into subfunctions), then the problem
goes away.

It's possible it's an obscure GCC bug, but that seems pretty
unlikely.  On the other hand, I didn't think there was a limit
to stack size in the kernel.  Or is there something like a
4K limit per function, or some such?

Any and all help is appreciated.

Thanks-

    -Thomas

2. Linux on QIC Tape?

3. 8 Mo stack limit per process

4. Yamaha XG 64V Wavetable Linux-compatible?

5. Stack limits

6. FVWM95 and all that clutter

7. Kernel Stack Limit...

8. The FAQ for this newsgroup

9. stack limit for users

10. How to increase the stack limit for a process?

11. stack limit:...

12. Netscape Enterprise server child stack limit

13. How to increase stack limit for CGI Script