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

Other Parts Discussed in Thread: SYSBIOS

Hi

I am into a migration exercise from DSP/BIOS to SYS/BIOS. There is a mechanism in the code where we want to report/print a message if a Memory_alloc fails to allocate the memory. The purpose of logging is to know from which memory sections, this allocation failed.

There are multiple segments in the memory map and for each section a heap memory is defined.

In DSP/BIOS, seg was of I32 type and in case of Sys/BIOS we have HeapMem_Handle.

The question is whether we have a provision in Sys/BIOS to associate a ID or probably determine the base address of the memory segment from which we are trying to allocate.

Getstats only provides the totalSize, FreeSize and LargestFreeSize.

Please comment.

Dushyant

 

  • Dushyant,

    If I understand your question correctly, you want to know if there's a way you can find out from which memory segment did the Memory_alloc fail.

    I think the answer is yes.  For example, the HeapMem module in SYSBIOS has a function called HeapMem_getExtendedStats() which gives
    you information about the buffer from which memory is allocated.  The buffer address should be enough to let you know which segment it came from right?

    Does that answer your question?

    Judah

  • Thanks Judah.

    HeapMem_getExtendedStats() works fine for what I want to achieve.

    -Dushyant