What is a Linux stack?

I recently ran into an error with "linux stack" and "linux stack size". I came across a blog that suggested I try

ulimit -a 

to find out what was the limit for my box, and it was set to 8192kb , which by default is considered.

What is the "linux stack"? How does it work, what does it store, what does it do?

+6
source share
1 answer

Short answer:

When programs are launched in your linux window, they regularly add and remove data from the stack as a function of the programs. The stack size indicates how much space is allocated for the stack. If you increase the size of the stack, this allows the program to increase the number of routines that can be called. Each time a function is called, data can be pushed onto the stack (stacked on top of the latest subroutine data.)

If the program is not very complex or intended for special purposes, the stack size of 8192kb is usually fine. Some programs, such as graphics processing programs, require a larger stack size to work. Because they can store a lot of data on the stack.

Feel free to increase the stack size for these applications, this is not a problem. To do this, use

ulimit -s bytes

BTW, fooobar.com/questions/21389 / ...

+8
source

Source: https://habr.com/ru/post/906263/


All Articles