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.

HeapMem and HeapMultibuf for C28X



Hi,Sir!

I know HeapMultiBuf is an enhanced HeapBuf with different block size, but I feel HeapMem is only a large block for variable size buffer. my application message size is variable, for example, from 4 bytes to 20 bytes. so I think HeapMem is more easy to use than HeapMultiBuf because only one HeapMem is defined. but what about memory fragment if I use HeapMem?

  • Can TI provide some material about how to realize HeapMem? 

  • Hi Decai,

    HeapMem is essentially a linked-list and is prone to external memory fragmentation. The SYS/BIOS Users' Guide has a good section on HeapMem and some suggestions on how to used it. The memory manager doesn't do any type of "housekeeping" to reduce fragmentation.

    If your application alloc's memory without releasing it then fragmentation won't be much of an issue for you.

  • Hi!

    I had tested HeapMem Module, it is very easy to use, and 4 byte alignment, that is to say, if you malloc a variable size buf, the real buffer size is 4*N. I also test fragment, it seems OK.

    In fact, I use Mailbox module with variable size buffer to communicate with each tasks.