I am using C. I am not using any dynamic memory allocation for the
time being, so all the internal SRAM consumption should be for the
stack. By the way, what kind of buffers are you refering to?
Thanks a lot!
--- In AVR-Chat@yahoogroups.com, Dave VanHorn <dvanhorn@d...> wrote:
> At 05:16 PM 8/20/2004, Yang Wang wrote:
>
>
> >Hello there,
> >
> >Does anyone have some experience in monitoring the SRAM usage at
> >runtime? Since the Atmega128 has only 4k SRAM, I am always
worrying
> >that at run time, storage of the program variables will eat up the
> >SRAM, but I don't know how to check at run time, how much of the
4k
> >SRAM has been used and how much is left there.
>
> Are you working in assembler or C?
>
> The most difficult thing, is to predict the depth of the stack,
especially in C.
> The other memory usage should be controlled by how you allocate the
memory when you write the code.
> Buffers are given a finite size, and of course you need to work out
what to do when they become full.