This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

c6678 Memory_alloc

Other Parts Discussed in Thread: SYSBIOS

Folks,

I have created a few heaps in external DDR3 and internal L2SRAM and I want to specify in my Memory_alloc the name of the heap.

Normally, if you specify NULL as the first parameter in Memory_alloc it uses the default heap. I now want Memory_alloc to not use the default heap and instead use a heap called myHeap say.

return (void *)Memory_alloc(myHeap, uiSize, 0, &errorBlock);

How do I go about ensuring that myHeap is defined in the source code file that contains the Memory_alloc call. I have already specified the myHeap in the .cfg file and it is in my map file. I have also included multicore_example.h. This multicore-example.h file contains the following lines

/* XDC/BIOS includes */
#include <xdc/runtime/IHeap.h>
#include <xdc/runtime/System.h>
#include <xdc/runtime/Memory.h>
#include <xdc/runtime/Error.h>

#include <ti/sysbios/bios.h>
#include <ti/sysbios/hal/Hwi.h>
#include <ti/sysbios/knl/task.h>
#include <ti/sysbios/heaps/HeapBuf.h>
#include <ti/sysbios/heaps/HeapMem.h>
#include <ti/sysbios/knl/Semaphore.h>

#include <xdc/cfg/global.h>

Thanks, Aamir

Thanks, Aamir