AF_DataRequest and memory management

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

AF_DataRequest and memory management

1,555 次查看
CecchiSandrone
Contributor II
Hi,

I want to know what's the memory management of buffers while calling AF_DataRequest because I'm encountering some "out of memory" errors from it. Who is responsible to free the buffer?
标签 (1)
0 项奖励
4 回复数

368 次查看
Mads
Contributor V
Cecchi,
 
you question is very general and would not be easy to answer.
I would recommend that you re-visit our documentation and read how the AF_DataRequest should be used.
 
But, to try and solve you issue:
When you do a AF_DataRequest, wait for the confirm before you initiate the next transmisison.
This will insure that you do not stavate the system.
 
BR,
Mads
0 项奖励

368 次查看
CecchiSandrone
Contributor II

Mads wrote:
 
But, to try and solve you issue:
When you do a AF_DataRequest, wait for the confirm before you initiate the next transmisison.
This will insure that you do not stavate the system.
 
BR,
Mads

Yes Mads, I understand this. I can't catch only who is responsible to free the buffer that contains the message to send. Furthermore, is there a "unreliable" way to send data without waiting for confirm?

0 项奖励

368 次查看
Mads
Contributor V
when you "pass on" a buffer, the layer you pass it to is responsible for the free'ing.
 
You only have to free when you receive - just like the demo application shows.
 
BR,
Mads
0 项奖励

368 次查看
CecchiSandrone
Contributor II
Ok...now is clear! Thanks again for info Mads.
0 项奖励