Welcome, Guest. Please login or register.

Author Topic: Another Linux Question  (Read 1238 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline tonywTopic starter

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 553
    • Show only replies by tonyw
Another Linux Question
« on: March 04, 2003, 08:33:02 AM »
How is stack space allocated in Linux? Is there a "stack" command, like in AmigaOS? Or does it automatically expand as required? Or what?

(I'm talking of kaffe, the JVM, which in m68k form is suffering random failures similar to stack overflow)

tony
 

Offline olegil

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 955
    • Show only replies by olegil
Re: Another Linux Question
« Reply #1 on: March 04, 2003, 09:06:19 AM »
Stack space in Linux is allowed to grow up to the max limit. So as long as you stay below a (sensible?) amount of megabytes you should be fine. This is however quite possibly different from cpu to cpu. Linux isn't JUST Linux if you're using m68k or ppc, for instance.
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: Another Linux Question
« Reply #2 on: March 04, 2003, 09:11:04 AM »
There is no stack limit, and the stack expands automagically. The stack memory can even be swapped to the disk, if other parts of the system need the physical memory.

If you want, you can limit the maximum possible stack size by using 'limit' command. Normally this is not required, though.
 

Offline tonywTopic starter

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 553
    • Show only replies by tonyw
Re: Another Linux Question
« Reply #3 on: March 04, 2003, 10:07:38 AM »
Thanks, guys. Great help.

tony