8 Mo stack limit per process

8 Mo stack limit per process

Post by Jacques Le Bourlo » Sat, 24 May 1997 04:00:00



Hello,

        I just bought Absoft f77, which works fine but for
one thing: Everything must compile with a -s flag to force
static storage which results in huge executable files.
        Absoft support tells that it comes from a new
limitation in kernels 2.0.x (and up) that limits the stack size
to 8 Mo per process.
        Does anybody know a way to change this either
        * By passing an option somewhere (where), or
        * By recompiling the kernel (How)?

        Thank you.
                                Jacques Le Bourlot

                                Observatoire de Meudon - France

PS: I act as a super user on my Linux box butI am not an expert!
        -> anything cryptic will probably be useless...

 
 
 

8 Mo stack limit per process

Post by Paul Flinder » Sat, 24 May 1997 04:00:00



Quote:> Hello,

>    I just bought Absoft f77, which works fine but for
> one thing: Everything must compile with a -s flag to force
> static storage which results in huge executable files.
>    Absoft support tells that it comes from a new
> limitation in kernels 2.0.x (and up) that limits the stack size
> to 8 Mo per process.
>    Does anybody know a way to change this either
>    * By passing an option somewhere (where), or
>    * By recompiling the kernel (How)?

Use the ulimit command (ulimit is a bash command - the csh equivalent to
'ulimit -s' is 'limit stack') to raise the stack size limit

e.g, on my machine

dawa# ulimit -s
8192
dawa# ulimit -s 32768
dawa# ulimit -s
32768

Two points to note

The default limit is indeed 8M - it is defined by the following around
line 293 in sched.h

#define _STK_LIM        (8*1024*1024)

the comment above this definition reads

/*
 * Limit the stack by to some sane default: root can always
 * increase this limit if needed..  8MB seems reasonable.
 */

Which leads me to my second point - the stack size limit can't be raised by
"ordinary" users, only root. Once raised the limit applies to the current
process and any children of that process.

Regards

Paul.

 
 
 

8 Mo stack limit per process

Post by Jacques Le Bourlo » Tue, 27 May 1997 04:00:00



> [question and answer skipped]

> Paul.

        That was exactly what I needed. Thank you, and thank
you also to those that answered by mail.
                                Jacques LB
 
 
 

1. Per-process/per-system File Descriptor Limits?

I apologize in advance for my really retarded question; I've
checked the FAQ, looked at the online info, checked out
various options under SMIT, etc. It's also been years and
years since I've touched an AIX box, and now it's suddenly
an issue.

What are the default limits on per-process and system-wide
open file descriptors? How does one change them? The system
that I'm using seems to have about 2K descriptors per process
(which is more than enough), but I don't know if it came that
way out of the box, or if things were somehow tweaked to be
that way.

Thanks in advance,

Douglas Barnes
C2Net

2. Strange keymapping for vi under X..

3. How to limit cpu time per process per user account

4. iptables port forwarding question...

5. Banshee with XFree86 and Slackware3.6

6. : mo buishet "MO MONEY MO MONEY MO MONEY"

7. PPP Problem

8. Change Process-Limits per User-ID?

9. 2.4 per process memory limit

10. per process limit of open file?

11. Memory per process limit

12. Limit No. of Processes per User?