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.

ti.sysbios.heaps.HeapMem: line 307: out of memory

Other Parts Discussed in Thread: SYSBIOS

Hi,all:

I meet a error info below,I don't know what that mean and how to remove that error info.

ti.sysbios.heaps.HeapMem: line 307: out of memory: handle=0x865068, size=428

ti.sysbios.heaps.HeapMem: line 307: out of memory: handle=0x865068, size=428

ti.sysbios.heaps.HeapMem: line 307: out of memory: handle=0x865068, size=428

ti.sysbios.heaps.HeapMem: line 307: out of memory: handle=0x865068, size=428

ti.sysbios.heaps.HeapMem: line 307: out of memory: handle=0x865068, size=428

ti.sysbios.heaps.HeapMem: line 307: out of memory: handle=0x865068, size=428

ti.sysbios.heaps.HeapMem: line 307: out of memory: handle=0x865068, size=428

ti.sysbios.heaps.HeapMem: line 307: out of memory: handle=0x865068, size=428

ti.sysbios.heaps.HeapMem: line 307: out of memory: handle=0x865068, size=428

ti.sysbios.heaps.HeapMem: line 307: out of memory: handle=0x865068, size=428

ti.sysbios.heaps.HeapMem: line 307: out of memory: handle=0x865068, size=428

ti.sysbios.heaps.HeapMem: line 307: out of memory: handle=0x865068, size=16

xdc.runtime.Error.raise: terminating execution

 

It shows that “ti.sysbios.heaps.HeapMem: line 307: out of memory” cause the error “xdc.runtime.Error.raise: terminating execution

1.

what does the error info below mean?

ti.sysbios.heaps.HeapMem: line 307: out of memory: handle=0x865068, size=428 ?

What does handle =0x865068 mean? What does size = 16  mean ? what does size = 428 mean?

Why this situation out of memory ? 

2.

How to remove that error info “ti.sysbios.heaps.HeapMem: line 307: out of memory: handle=0x865068, size=428”  and avoid “terminating execution” ?

3.

I want to increase the heapMem size in cfg .My old cfg file is like below:

 

var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');

var heapMemParams = new HeapMem.Params();

heapMemParams.size = 0x8000;

heapMemParams.sectionName = "HEAPSEC ";

Program.global.INTMEM_HEAP = HeapMem.create(heapMemParams);

var BIOS = xdc.useModule ("ti.sysbios.BIOS");

/* specify heap size */

 BIOS.heapSize    = 0xA000;

 

But when I see the HeapMem Size in the ROV below ,it says HeapMem size is 0xA000 not 0x8000 . why ?

  • Hi Ferninand,

    1 -

    ti.sysbios.heaps.HeapMem: line 307

    Tells the line in the file BIOS_INSTALL_DIR/packages/ti/sysbios/heaps/HeapMem.c, you can check exactly what's happening. Basically you're running out of memory. The handle=0x865068 tells the address of your heap that's running out of memory.

    I think that size=428 tells the size that you're trying to allocate.

    2 - Try increasing the size of your heap, maybe you will have to change the memory where it's allocated. For this you could do something like

    Program.sectMap["HEAPSEC"] = "DDR3";

    3 - You're seeing two heaps because one is the BIOS heap and the other is the one that you're explicitily creating in .cfg (with size 0x8000). Comment out one of them. So if you would like to use the new heap as default heap, comment the line of BIOS.heapsize and add this line:

    Memory.defaultHeapInstance = Program.global.INTMEM_HEAP;

    Regards,

    J

  • Hi Ferninand,

    I think a good point to remember is that when you use BIOS, it needs a heap and you have set that size to 0xA000.  This lines before that are a separate heap that you create perhaps for your project.  You can see by ROV tool that the HEAPSEC has not been used at all.  The BIOS heap has ran out of memory and needs to be larger.   Like Johannes said, that might mean you have to move it to DDR3. 

    BrandyJ

  • Hi Ferninand,

    Ferdinand said:

    What does handle =0x865068 mean? What does size = 16  mean ? what does size = 428 mean?

    Like Johanees mentioned, "size=428" specifies the amount of memory requested. "handle" represents the pointer to the requested heap instance's object.

    Ferdinand said:

    How to remove that error info “ti.sysbios.heaps.HeapMem: line 307: out of memory: handle=0x865068, size=428”  and avoid “terminating execution” ?

    In your app you have 2 heap mem instances - one that you create in your *.cfg file and the second that is created by BIOS and serves as the system heap. It looks like you are only using the System heap so you should get rid of the HeapMem create code from the *.cfg file.

    Was the screen shot you shared taken after the error occured or before ? Why I ask is because as per the screenshot, the HeapMem instance still has some 0x9000+ bytes free space. With this much free space, a request for 428 bytes should not fail. If the screenshot was taken before the error, can you share a screenshot of the ROV view immediately after the error is reported ?

    Best,

    Ashish