Hi,
I have some questions about Memory_alloc.I'd be glad if someone can help me.
The Memory_alloc function is:
Memory_alloc(IHeap_Handle heap, SizeT size, SizeT align, Error_Block *eb);
So my questions are:
1 - Why should I use Memory_alloc instead of C's malloc? What's the advantage of doing this?
2 - The third parameter (SizeT align) is measured in bits or bytes? Suppose I want a 32 bit aligned vector, the align parameter will be 32 or 4?
3 - How do I create and specify which heap I'm using. Until now I've managed to create a heap in MSMCSRAM or DDR3 and make it as default heap, so I can pass 0 or NULL as first parameter in Memory_alloc call. But suppose I want two heaps, one in L2SRAM and other in DDR3, how do I create the heaps and specify which one I should use when allocate memory? Is it possible?
Thanks for any help