tags:

views:

81

answers:

1

Hi,

I am new to Vxworks. I have a doubt regarding the memory allocation/deallocation in Vxworks?

Can one task allocate memory from heap(say T1) and that can be freed by some other task (say T2)?

Thanks & Regards, AKS

A: 

If both tasks are executing in the same memory context, then yes it is totally possible.

If your tasks are executing in the kernel context (or you are using vxWorks 5.x) then there is no problem with what you are describing.

If both tasks are executing in the same RTP (Real-Time Process), the you can release the memory from T2.

What you can't do is release memory in different memory contexts i.e. release kernel memory from an RTP, or have RTP 2 release memory allocated by RTP1.

Benoit