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.

Max useful memory in a shared memory



Hi,

I'm using a 6678 and I have a memory section in DDR of size 0x1000_0000. I have a few questions about how much of this size I can use to allocate memory if I use a heap inside a shared memory region, I think we lose some bytes due to headers, right? So my questions are:

1 - What is the maximum size of the shared memory region I can create? Is it equal to memory section size?

2 - Inside the shared region I create a HeapMemMP, what's the maximum allowed size for this heap when compared to the shared region size?

3 - And after the heap is created and I start to allocate memory with HeapMemMP_alloc, do I lose some part of the heap with header information or can I use the full heap?

Thanks and regards

Johannes

  • Johannes said:
    1 - What is the maximum size of the shared memory region I can create? Is it equal to memory section size?

    Yes, your Shared Region can be up to the size of your section assuming nothing else is being placed there.

    Johannes said:
    2 - Inside the shared region I create a HeapMemMP, what's the maximum allowed size for this heap when compared to the shared region size?

    If you are using SR0, there is a reserved section that may differ from devices thus the entire Shared Region can't be allocated to the heap type (HeapMemMP, HeapBufMP, etc.).  To determine this size, use the Run-time Object Viewer (ROV) from Code Composer Studio (see here) to see the size of the reserved section for SR0.  For other user created Shared Region, the entire region can be made into a heap type.

    Johannes said:
    3 - And after the heap is created and I start to allocate memory with HeapMemMP_alloc, do I lose some part of the heap with header information or can I use the full heap?

    The entire heap that is created is allocatable.