Does _msg_free() actually free the memory?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Does _msg_free() actually free the memory?

1,339件の閲覧回数
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 返信

942件の閲覧回数
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.