This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Maximal Stack-Size

How I can calculate the maximal Stack-Size of my program.

=> Based on the Source-Code ( + RTX-Tiny ),
( For User- and System-Stack ) :

-> Is there a Software-Tool ?

Parents
  • Hi Steffen.

    If you are intrested in your program's stack utilization, the direct approach is to fill the stack area with a known byte pattern (for example, all zeros), then run your program with debugger and stress it to make it use as much stack as possible, then stop the program and inspect stack area to see where the CPU has touched it. This way you will get the idea of how much stack your program uses.
    It is hardly possible to predict a program's stack utilization based solely on the source code, unless it's a very simple program.
    The stack sizes are set in Startup.a66, of course.

    Regards,
    - mike

Reply
  • Hi Steffen.

    If you are intrested in your program's stack utilization, the direct approach is to fill the stack area with a known byte pattern (for example, all zeros), then run your program with debugger and stress it to make it use as much stack as possible, then stop the program and inspect stack area to see where the CPU has touched it. This way you will get the idea of how much stack your program uses.
    It is hardly possible to predict a program's stack utilization based solely on the source code, unless it's a very simple program.
    The stack sizes are set in Startup.a66, of course.

    Regards,
    - mike

Children