[Tinyos-help] Code copying (generic) VS PoolC+QueueC+Code sharing

Krisakorn Rerkrai krisyok at gmail.com
Tue Feb 12 02:59:24 PST 2008


Hi,

I'm working on one application which probably needs a generic component
approach.
I'm a bit concerned about the code size generated by code copying method.
Another
solution I was thinking of is to use PoolC and Queue to maintain my
attribute list and
feed this list to a single component (code sharing approach but manually
manages
the attribute on the upper layer component). Which approach is a code
optimized
solution?

I try with BlinkAppC to see how much memory code copying approach takes.
I simply remove the Timer component to investigate this.

BlinkAppC
#Timers        ROM       RAM
    3              2642         55
    2              2616         45
    1              2526         35

If I look at the memory usage by each module, I can see how much
VisualizeTimerC uses.

VisualizeTimerC
#Timers        ROM       RAM
    3               448         30
    2               422         20
    1               320         10

For RAM usage, it's clear why this is linear. However, the ROM side seems to
use less
memory when a generic component is used several times. Is there any reason
behind this?

Also, could somebody suggest me which approach is more efficient (in terms
of memory usage)?
1. several generic modules
2. PoolC+QueueC+single module

Thanks,
Krisakorn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20080212/d9c99daa/attachment.htm


More information about the Tinyos-help mailing list