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.

Determining available memory in a buffer pool (POOL module)

Our application is using static pools within the POOL module. We are using these pools (four different pools) to allocate messages for the MSGQ module (MSGQ_alloc()). This is working just fine, but we would like to be able to calculate the remaining/available memory in each pool. I don't see such a way to calculate this using any of the API. I was hoping there was something such as POOL_stats() that would return the free blocks or free memory.

Does anyone know of a way to accomplish this? Thanks in advance!

  • Hi Mark,

    Which version of BIOS are you using? Are you using DSPLink also? If yes, which version?

    MSGQ on BIOS does not have a POOL_stats API or interface function. I did a quick look in the version of DSPLINK I have and they do not either. Did you write you own POOL implementations or are you using one provide with BIOS and/or DSPLink? If you are writing your own, you can always add a function that you call directly. Of course the downside is that you lose the ability to move between POOL implementations.

    For future reference: MessageQ in Ipc (next generation MSGQ) uses XDC heaps which have a stats inteface function that give you totalSize, totalFreeSize and largestFreeSize. 

    Todd

  • Hi Todd,

    BIOS is version 5.41.03.17 and DSPLINK is version 1.65.00.02.

    We are using what is referred to as STATICPOOL in the documentation. We are implementing STATICPOOL as described in the DSP/BIOS 5.x API document (the filename for me is BIOSAPI-C6x_spru403q.pdf) on page 2-328. So, I believe this means we are not writing our own pool implementation.