How do you UP the Hard limit on the stack?

How do you UP the Hard limit on the stack?

Post by Mike Kraus » Sun, 22 Mar 1998 04:00:00



How do you UP the Hard limit on the stack?

I just switched to Solaris X86 from Solaris for sparcs. I run a game online
that requires a lot of memory called Medievia. (www.medievia.com). The
sparc solaris came with a hard limit of over 2 gigs. The x86 version has a
hard limit of just 133 megs. I have poured over the OS for days now trying
to find a way to configure this higher. Using ULIMIT will not work right as
I really need the hard limit set higher as default and not just on a shell
per shell basis. I know what I need to do must be possible as Sun would not
cripple their OS for high end high horse power users like myself.

Any info on this subject would be greatly appreciated. My email is

 
 
 

1. Hard limit of stack size

Hi, folks.

The hard limit of the stack size is set in
/usr/src/linux/include/asm/resource.h
as the same value of the current limit.
And the current value is set to 8MB in the include/linux/sched.h.
That is not good for large problems and I sometimes need to expand
the limit. But 8MB is hard limit and only root can change the value.
I feel the limitation of stack size is nonsense while the max memory
size is set as unlimited.
So I patched the code as attached patch, and have no problem until now.

Is there anybody who knows why the hard limit of stack size is set as
same as the current limit?

        Naohiko Shimizu

*** resource.h.orig     Thu Oct 29 14:30:43 1998
--- resource.h  Thu Oct 29 14:30:56 1998
***************
*** 25,31 ****
        { LONG_MAX, LONG_MAX },                         \
        { LONG_MAX, LONG_MAX },                         \
        { LONG_MAX, LONG_MAX },                         \
!       { _STK_LIM, _STK_LIM },                         \
        {        0, LONG_MAX },                         \
        { LONG_MAX, LONG_MAX },                         \
        { MAX_TASKS_PER_USER, MAX_TASKS_PER_USER },     \
--- 25,31 ----
        { LONG_MAX, LONG_MAX },                         \
        { LONG_MAX, LONG_MAX },                         \
        { LONG_MAX, LONG_MAX },                         \
!       { _STK_LIM, LONG_MAX },                         \
        {        0, LONG_MAX },                         \
        { LONG_MAX, LONG_MAX },                         \
        { MAX_TASKS_PER_USER, MAX_TASKS_PER_USER },     \

2. Roadrunner Cable modem with FreeBSD

3. Increasing stack size hard limit ?

4. Need LINUX

5. Shape Ups,Men's Shape Ups,Men's Skechers Shape Ups - new styles!

6. Unresolved symbols - module problem

7. setrlimit incorrectly allows hard limits to exceed soft limits

8. Quicktime for Linux

9. Stack limit

10. Is there a stack size limit under UNIX?

11. Stack Size Limit???

12. Enlarging STACK SIZE limit ?