[Icc-avr] Freeing static variables

Bengt Ragnemalm benra at imt.liu.se
Mon Oct 22 01:17:25 PDT 2007


Is there any intelligent way to release the memory used by a static
variable?

 

I have a calibration routine that is run the first loops of the program. If
the calibration was done in a separate function , I could just use temporary
variables but as this is run in the entire normal program loop I can not see
any other way than to use statics for my temporary variables in the
calibration routine.

 

But after the calibrating is done, it would have been nice to free the space
used by the static variables.

 

Maybe there is some better way to do this so any suggestions are welcome.

 

Regards,

Bengt

________________________________________________________________

Bengt Ragnemalm                        Tel +46 13 22 24 97

Research engineer                                       FAX: +46 13 10 19 02

Linköpings Universitet
<mailto:bengt.ragnemalm at imt.liu.se> mailto:bengt.ragnemalm at imt.liu.se

Inst. för Medicinsk Teknik Internet:         <http://www.imt.liu.se/>
http://www.imt.liu.se

S-581 85 Linköping SWEDEN

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://dragonsgate.net/pipermail/icc-avr/attachments/20071022/6d363f1a/attachment.html


More information about the Icc-avr mailing list