[Avrora] Memory leak correction
Daniel Minder
daniel.minder at uni-due.de
Fri Jan 8 13:12:20 PST 2010
Dear Ben,
> I have made some bugfixes to Avrora
Bugfixes on the day before X-Mas are dangerous :) Actually, two things
got broken:
- Each node needs its own EnergyControl. Therefore, it is not correct to
create only one instance in Simulation. Instead, each Simulator should
have its own instance! (In the EnergyMonitor implementation before your
fix the constructor called EnergyControl.nextInstance() to create the
next instance which is used by the next EnergyMonitor. Argh, baaaad
implementation...)
Due to the move of getEnergyControl() several other files had to be
modified as well (ATMega128, ATMega128New, ExternalFlash, LED,
SensorBoard, CC1000Radio, CC2420Radio)
- The PacketMonitor discarded every received packet since in the new for
loop in fireAfterReceiveEnd() cnt counts from 0 to bufferPos-1 whereas
in the old version cnt counts from 1 to bufferPos. Therefore, the byte
positions in the switch/case statements have to be adjusted.
A diff is attached. I hope the fixes will make it to CVS soon. I'll also
send you the complete files directly - they are too big for the mailing
list.
Best,
Daniel
--
Daniel Minder
University of Duisburg-Essen, Networked Embedded Systems
Bismarckstr. 90, 47057 Duisburg, Germany
Skype: d.minder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff.zip
Type: application/octet-stream
Size: 2477 bytes
Desc: not available
URL: <http://lists.ucla.edu/pipermail/avrora/attachments/20100108/a5b276c7/attachment.obj>
More information about the Avrora
mailing list