z/OS Language Environment Customization
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


THREADSTACK64 (AMODE 64 only)

z/OS Language Environment Customization
SA38-0685-00

Derivation: THREAD level STACK storage for AMODE 64

THREADSTACK64 controls the allocation of the thread's stack storage for AMODE 64 applications, except for the initial thread in a multithreaded environment.

AMODE 64 default
THREADSTACK64=((OFF,1M,1M,128M),OVR)
Read syntax diagramSkip visual syntax diagram
Syntax

                           .-OFF-.                             
>>-THREADSTACK64--=--(--(--+-ON--+--,--initial--,--increment---->

                     .-OVR----.      
>--,--maximum--)--,--+-NONOVR-+--)-----------------------------><

OFF
Indicates that the allocation suboptions of the STACK64 runtime option are used for thread stack allocation. Any other suboption specified with THREADSTACK64 is ignored.
ON
Controls the stack allocation for each thread, except the initial thread, in a multithreaded environment.
initial
Determines the size of the initial stack segment. The storage is contiguous. This value is specified as nM bytes of storage.
increment
Determines the minimum size of any subsequent increment to the stack area. This value is specified as nM bytes of storage. The actual amount of allocated storage is the larger of two values— increment or the requested size—rounded up to the nearest multiple of 1MB.

If you specify increment as 0, only the amount of the storage needed at the time of the request, rounded up to the nearest multiple of 1MB, is obtained.

The requested size is the amount of storage a routine needs for a stack frame.

maximum
Specifies the maximum stack size. This value is specified as nM bytes of storage. When the maximum size is less than the initial size, initial is used as the maximum stack size.
OVR
Specifies that the option can be overridden.
NONOVR
Specifies that the option cannot be overridden.

Usage notes

  • The 1MB guard area is not included in any of the sizes.
  • The maximum thread stack segment is the maximum of THREADSTACK64 initial and maximum sizes.
  • When a multithreaded application that creates many pthreads is run, the default value of 128MB for the maximum stack size of the STACK64 and THREADSTACK64 runtime options might cause excessive use of system resources, such as real storage. For such applications, you need to use the Language Environment® Storage Report (RPTSTG runtime option) to determine the actual pthread stack storage usage of your application, and then use the THREADSTACK64 runtime option to set the maximum stack size to a value closer to the actual usage.

Performance considerations

To improve performance, use the storage report numbers generated by the RPTSTG runtime option as an aid in setting the initial and increment sizes for THREADSTACK64.

For more information

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014