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.

Memory Allocation freed at Bios exit ?

Hello everyone,

(target C6678, CCS 5.5, BIOS 1.25, XDCTools 3.25)

I have a very very simple application with just one task that does a memory allocation with Memory_alloc.

Then I do a Bios_exit() call. Nothing else : 1 Memory_alloc 1 Bios_exit

When I use HeapMin instead of HeapMem I get this error

"xdc.runtime.HeapMin: line 85: free() invalid in growth-only HeapMin
xdc.runtime.Error.raise: terminating execution"

but I don't call any free() function !

So I'm wondering if SYS/BIOS isn't trying to free its memory when the user calls "Bios_exit".

Thank you,
Clement

  • Hi Clement,

    We are currently looking into this issue.  BIOS_exit() cycles through a list of destructors to clear any remaining handles.  During this process there is a call to free() which causes the error message.  Since this is called during exit; it should not affect your application.  In the meantime, you can remove this error by disabling free() error messages in your projects .cfg.

    // Add the following to your .cfg
    var HeapMin = xdc.useModule('xdc.runtime.HeapMin');
    HeapMin.freeError = false;

    Thanks,

    -- Emmanuel

  • Hi Emmanuel,

    Thank you for your answer.

    Fair enough for now with the cfg config. It's not critical for me.

    Clément