Quantcast
Channel: Embedded Software (Read Only)
Viewing all articles
Browse latest Browse all 25965

Forum Post: RE: ARM - DSP Message Queueing, message allocation on both sides

$
0
0

Arnie,

If I understood you correctly, for example

1 Heap use case:

ARM:

Creates heap with HeapBufMP_create and registers the Heap with MessageQ_registerHeap.

DSP:

Opens the heap with HeapBufMP_open, now I should have a valid HeapBufMP_Handle *handlePtr.

Then use that handle to register the heap with MessageQ_registerHeap(Ptr heap, UInt16 heapId);

I suppose that this registration gives the MessageQ API access to the Heap. That way i should be able to allocate new messages in the shared heap from each sides.

2 heaps use case:

Just do on DSP-side HeapBufMP_create instead of HeapBufMP_open, also make sure that the Queue reader logic on each side is accessing correctly the Queue writer heap (Wondering if one MessageQ_Handle for each side is enough or could cause trouble) .

From the post you pasted, I think the 2 heaps use case may be considered if speed is a concern, talking about contention on the heap:

"This puts heavy contention on the heap instance because both sides are doing alloc and free"

I may consider using 2 heaps in that case, never used this GateMP API though ..

Thanks


Viewing all articles
Browse latest Browse all 25965

Trending Articles