Hi,
When executing a program in DEBUG-mode, I get a rather detailed list of events. One of those details concerns stack usage:
Stack size as defined in the icon: 32768 FLOW : - main entered FLOW : -- Alloc_ExecParam entered FLOW : -- Alloc_ExecParam vacated FLOW : -- Fill_DeadBeef entered STACK: * Starts at [ 5180A004 ] STACK: * Ends at [ 51811FFC ] STACK: * Position at [ 51811690 ] STACK: * Available [ 0000768C ] = [ 30348 ] FLOW : -- Fill_DeadBeef vacated . . . FLOW : -- Read_DeadBeef entered STACK: * [ 32760 ] bytes allocated STACK: * [ 32760 ] bytes used = [ 100% ] FLOW : -- Read_DeadBeef vacated FLOW : -- Free_ExecParam entered FLOW : -- Free_ExecParam vacated FLOW : - main vacated
It looks as if stack is on the small side. However
Stack size increased to 44444 FLOW : - main entered FLOW : -- Alloc_ExecParam entered FLOW : -- Alloc_ExecParam vacated FLOW : -- Fill_DeadBeef entered STACK: * Starts at [ 4E9C9004 ] STACK: * Ends at [ 4E9D3FFC ] STACK: * Position at [ 4E9D3690 ] STACK: * Available [ 0000A68C ] = [ 42636 ] FLOW : -- Fill_DeadBeef vacated . . . FLOW : -- Read_DeadBeef entered STACK: * [ 45048 ] bytes allocated STACK: * [ 13532 ] bytes used = [ 30% ] FLOW : -- Read_DeadBeef vacated FLOW : -- Free_ExecParam entered FLOW : -- Free_ExecParam vacated FLOW : - main vacated
Instead of 100% usage when 32768 bytes are allocated, usage drops to a mere 30% when 44444 bytes are provided. What is the reasoning behind this? Just curious, you know...
OldFart