Whenever any program runs, the system must provide a certain amount of physical memory, with some of this physical memory allocated for the stack. This stack memory is typically used to store the values of different program variables. Operating systems handle stack memory allocation in either of two ways: fixed stack size or dynamically allocated stack size.
In systems with a large amount of memory (e.g., systems running on Windows NT/95/98/2000 or UNIX environments), the system will usually dynamically allocate memory for the stack. Therefore, you do not need to specify the amount of the available physical memory allocated for the stack.
However, in systems with less memory (such as DOS or embedded processors with less than 64K of addressable memory), the operating system has limited memory space with which to work. Therefore, you must specify the size of the physical memory allocated for the stack, only specify what is needed for the stack. This direct specification allows you to specify only what is needed for the stack, thereby getting the best utilization of the limited memory space.
The provided PC-based and UNIX-based 32-bit implementations of the Players can dynamically allocate stack memory. The PC-based 16-bit implementation of the Players must have the stack size specified because the 16-bit DOS and Windows 3.x operating systems cannot expand the application's stack space on demand. When porting the Jam STAPL Player or Jam STAPL Byte Code Player to a specific microprocessor, compile the code with the appropriate stack memory settings.