[Tinyos-help] Problem when using PoolC
behnaz.bostanipour at epfl.ch
behnaz.bostanipour at epfl.ch
Wed Dec 17 06:29:53 PST 2008
Hi,
I just checked and the pool is empty.
After I tried to check the size and maxSize of
the pool before and after get as below:
maxSizeBeforeGet=call SendPool.maxSize();
sizeBeforeGet=call SendPool.size();
newmsg = call SendPool.get();
maxSizeAfterGet=call SendPool.maxSize();
sizeAfterGet=call SendPool.size();
post sendDataToSerial();
And the value of all these fields is zero all the time .
Any ideas?
Thanks,
B.
Quoting Philip Levis <pal at cs.stanford.edu>:
>
> On Dec 5, 2008, at 1:58 AM, behnaz.bostanipour at epfl.ch wrote:
>
>>
>> I realized that the value of newmsg in sendDataPkt() is most of
>> the time NULL.
>> Should I initialize it or am I doing sth wrong?
>> here is my wiring:
>
> Pool returns NULL if it is empty. Can you check that it's not empty?
> This could happen because you have a memory leak and so the pool size
> shrinks over time or because packets are not draining as fast as they
> are being generated (so the pool runs out).
>
> Phil
>
More information about the Tinyos-help
mailing list