Does _msg_free() actually free the memory?

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

Does _msg_free() actually free the memory?

817 Views
sfarhan
Contributor I

Hi,

 

I've a question regarding the _msg_free() api:

 

I've a situation where I've to do a malloc() of the message that I want to post on a message queue. My question is whether this memory is actually freed when I call the _msg_free() API?

 

Thanks in advance.

 

Regards,

sfarhan

0 Kudos
1 Reply

420 Views
EAI
Contributor IV
You can't malloc a message. You must create a message pool, then allocate a message from the messag pool. _msg_free returns the message to the message pool.  Read section 3.7.7.3 of the MQX users manual, it is explained there.