Log In    |    Knowledge Base    |    4D Home
Tech Tip: What is the minimum stack size for my process?
Published On: July 23, 2009

This is an update to the 4D 2004 Tech Tip Calculating the minimum stack size. That Tech Tip describes two techniques for calculating the minimum stack size a process will need: Design-based and Testing-based. The Design-based calculation works in the same manner in 4D v11 SQL as it did in 4D 2004. The Testing-based calcuation process must change though.

In 4D 2004 it was suggested to use the 4D Pack command AP AVAILABLE MEMORY. This command has been deprecated in 4D v11 SQL and instead using the inspector in the debug window is suggested. You can run your method in the debug window and track the value of "Stack Size" under the "Information" heading. In this manner you will be able to find your process's realistic stack size.

The idea remains the same as outline in the 4D 2004 Tech Tip: First assign a very large stack size. Then exercise your process so as to get an idea of how much memory it really uses. Through iterative testing the stack size can be reduced until an acceptable minimum level has been reached.