# Stack

**URL:** <https://community.sparkfun.com/t/stack/2580>\
**Category:** MicroMod\
**Tags:** msp\
**Created:** [September 1, 2006, 8:23pm UTC](https://community.sparkfun.com/t/stack/2580 "2006-09-01T20:23:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![DIXON](https://avatars.discourse-cdn.com/v4/letter/d/c0e974/32.png) [@DIXON](https://community.sparkfun.com/u/DIXON)\
**Post date:** [September 1, 2006, 8:23pm UTC](https://community.sparkfun.com/t/stack/2580/1 "2006-09-01T20:23:37Z")

</div>

I’m using the IAR compiler and I get a stack usage warning (\>90%) even without calling to much nested functions. The default size is 80 bytes, maybe is too few, what is the normal value?

It seems that when you pause the execution the stack window shows the peak usage, isn’t it?

---

<div class="post-metadata">

**Author:** ![wiml](https://avatars.discourse-cdn.com/v4/letter/w/48db29/32.png) [@wiml](https://community.sparkfun.com/u/wiml)\
**Post date:** [September 2, 2006, 3:47am UTC](https://community.sparkfun.com/t/stack/2580/2 "2006-09-02T03:47:13Z")

</div>

Do you maybe have some large stack-allocated variables?

---

<div class="post-metadata">

**Author:** ![DIXON](https://avatars.discourse-cdn.com/v4/letter/d/c0e974/32.png) [@DIXON](https://community.sparkfun.com/u/DIXON)\
**Post date:** [September 4, 2006, 7:24am UTC](https://community.sparkfun.com/t/stack/2580/3 "2006-09-04T07:24:09Z")

</div>

stack-allocated? the only way I know to allocate variables in stack is as parameters, and I use to pass pointers.

No, I don’t think so… but I’ll go throw step by step.

Anyway 80 bytes is not a value too little?

---

<div class="post-metadata">

**Author:** ![wiml](https://avatars.discourse-cdn.com/v4/letter/w/48db29/32.png) [@wiml](https://community.sparkfun.com/u/wiml)\
**Post date:** [September 5, 2006, 2:28am UTC](https://community.sparkfun.com/t/stack/2580/4 "2006-09-05T02:28:49Z")

</div>

Local variables in functions are also allocated on the stack (like parameters are).
