Does _msg_free() actually free the memory?

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

Does _msg_free() actually free the memory?

818 次查看
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 项奖励
1 回复

421 次查看
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.