
Operating System Stack Analysis with VerOStack
VerOStack may be used on an application that runs on a bare computer or on applications that run on an operating system. VerOStack will measure the worst-case stack use from any entry point. For example, VerOStack has been used to measure worst-case stack use on the Wind River VxWorks 653 ® operating system (OS). This stack use information is held in separate files. To compute each stack required by an application and its tasks, the size of the stack used by the OS functions, when invoked by the application, must be factored in. Some of the OS API call stacks will vary in size between applications because the applications may register a callback or a ‘hook’ routine with the OS, which the OS then calls. The VerOStack user is presented with all indirect routine references and must specify a size for each of their registered functions. (VerOStack will already have determined this information from your application). This information becomes part of the OS API stack size information, which is used by VerOStack as it calculates the application’s stack depths.
The diagram below shows example calling tree interactions between three tasks within an application (T, U, and V), the OS, and the user callback/hook routines (k and l). To compute the call stack for V, the VerOStack user must supply the stack sizes for k and l.

From the calling trees shown in the figure above, the maximum calling stack for each task is:
T = a + Max(( b + c ), (d + m + n + Max(o, p))) = 46
U = e = 45
V = f + Max(g, (h + Max(Max(w,(x + y)),( i + j + q + r + Max(k,(s + l)))))) = 49
