AF_DataRequest and memory management

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AF_DataRequest and memory management

1,545 Views
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?
Labels (1)
0 Kudos
4 Replies

358 Views
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 Kudos

358 Views
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 Kudos

358 Views
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 Kudos

358 Views
CecchiSandrone
Contributor II
Ok...now is clear! Thanks again for info Mads.
0 Kudos