hi,

i'm trying to figure out stack information generated from checkStack.

when running VxWorks 5.4 on PPC405.
using Tornado2 debugger.

spawning task:
taskSpawn("stackTest", 200, 0, 1024, (FUNCPTR)(&stackTest), 0, 0, 0, 0,
0, 0, 0, 0, 0, 0);

with the function:
void stackTest(int num)
{
if (num==1000)
return;
else
stackTest(num+1);
}

i put a breakpoint in the if statement.
first time the task breaks, stack data is like this:
NAME ENTRY TID SIZE CUR HIGH MARGIN
------------ ------------ -------- ----- ----- ----- ------
stackTest stackTest 3bfd710 1008 112 728 280

second break:
NAME ENTRY TID SIZE CUR HIGH MARGIN
------------ ------------ -------- ----- ----- ----- ------
stackTest stackTest 3bfd710 1008 136 752 256

my questions:
1. why the stack size is 1008, when i asked for 1024?
2. why the initial size the task uses is 112? when in every recursive
iteration the size increments in 24? (after all it is the first call of
that function)
3. why does every recursive iteration increments the size of stack in
24, when passing only integer?
4. how does the "high" parameter increases when only using 136 in
current stack size?

thanx in advance
PSben