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.

Compiler/CCSTUDIO-SITARA: Section Memory Map with C++

Part Number: CCSTUDIO-SITARA

Tool/software: TI C/C++ Compiler

Hello,

I have some problems to understand How does function allocation.

In our code, we are using C++ classes dynamically allocated with a new operator.

We thought that this allocation was made in the heap section but when we open the map file we see the following:

.heap      0x80052300        0x0
                0x80052300                __heap_start__ = .
                0x80052300                end = __heap_start__
                0x80052300                _end = end
                0x80052300                __end = end
                0x80052300                . = (. + __HEAP_SIZE)
                0x80052300                __heap_end__ = .
                0x80052300                __HeapLimit = __heap_end__

.bss        0x80052240     0xefac
                0x80052240                __bss_start__ = .

First, the heap section size is 0: so where is the space allocated in the am35x_.cfg file: BIOS.heapSize = 32000 wich define the heap system?

Furthermore, If we look at the adress and  we have seen a conflict between the heap adress (0x80052300) and the bss segment for the tiesc_fw_cir_buff.o file that starts at 0x80052258 and which size is 0x808 .(so, overlap the adress 0x80052300) !

Is there anyone who can explain us allocation, reservation, heap size, pinit section..... ?

Thanks a lot for ypour help !

Laurence

  • Laurence,
    BIOS.heapSize defines the size of the buffer for one of the BIOS Heap instances. The default heap manager is HeapMem, I think, so you could search your memory map for ti_sysbios_heaps_HeapMem_Instance_State_0_buf__A and find it. In case you selected a different heap manager, you should be able to find the buffer using a similar search.

    Is the bss section overlapping any other section? Since .heap is zero sized, it's possible that the linker knows not to take into account that section when allocating other sections. I am just guessing here, I hope linker experts on this forum will chime in.
  • Cazaban Laurence said:

    In our code, we are using C++ classes dynamically allocated with a new operator.

    We thought that this allocation was made in the heap section

    This memory comes from the section named .sysmem.  The size of this section is given by the symbol __SYSMEM_SIZE.

    Cazaban Laurence said:
    we have seen a conflict between the heap adress (0x80052300) and the bss segment for the tiesc_fw_cir_buff.o file that starts at 0x80052258 and which size is 0x808 .(so, overlap the adress 0x80052300)

    0x80052258 + 0x808 is 0x80052a60.  There is no conflict.

    Thanks and regards,

    -George