0

Does exist any tool/command for checking the maximum that a process stack has used? I need that to tune the stack size configuration for a program.

0

The maximum size of stack is 256MB (per thread). Here you can find official IBM documentation about this:

Limits and Default Values

The threads library has some implementation-dependent limits and default values. These limits and default values can be retrieved by symbolic constants to enhance the portability of programs.

Maximum Number of Threads per Process

The maximum number of threads per process is 512. The maximum number of threads can be retrieved at compilation time using the PTHREAD_THREADS_MAX symbolic constant defined in the pthread.h header file.

Minimum Stack Size

The minimum stack size for a thread is 96KB. It is also the default stack size. This number can be retrieved at compilation time using the PTHREAD_STACK_MIN symbolic constant defined in the pthread.h header file.

Note that the maximum stack size is 256MB, the size of a segment. This limit is indicated by the PTHREAD_STACK_MAX symbolic constant in the pthread.h header file.

Also check per user ulimit stack size (which is in kb)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.