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.

BIOS 5.33 vs. 5.20: higher mem usage when calling MEM_define?

Hello,

In a C6416 project we've upgraded from BIOS 5.20.05 to BIOS 5.33.06. We use MEM_define() to generate 120 heaps, we use a heap for each channel in our application. The following code is called from main():

#define SMEM_NO_SWOBJ_MAX 120 

    for ( n1 = 0; n1 < SMEM_NO_SWOBJ_MAX; n1++ )
    {
        /* init and allocate external object memory */
        SMEM_obj.segTab[n1].id      = MEM_define(SMEM_extObjTab[n1], SMEM_EXTOBJ_SIZE);
        SMEM_obj.segTab[n1].pSeg    = SMEM_extObjTab[n1];
        SMEM_obj.segTab[n1].pData   = SMEM_extObjTab[n1];
    }

With BIOS 5.20.05 the following amount of memory is used:

Name    largest  free     used   total    start    end
IDRAM0, 0x25d38, 0x28108,
0x9f8, 0x28b00, 0x32c08, 0x5b707, 0 

 

But when doing the same on BIOS 5.33.06, nearly all the memory in IDRAM0 (BIOSOBJSEG) is used: 

Name    largest free    used     total    start    end
IDRAM0, 0x23d0, 0x23d0,
0x26730, 0x28b00, 0x32c08, 0x5b707, 0

 

Then we tried to call MEM_increaseTableSize before the loop:

    /* for the maximum number of swappable objects */
    stat = MEM_increaseTableSize(SMEM_NO_SWOBJ_MAX+20);
    if(stat != SYS_OK)
    {
        DBG_stdErr1(DBG_ERR_SMEM_CREATE, "SMEM_init: MEM_increaseTableSize failed: %d", SMEM_NO_SWOBJ_MAX);
        return(SMEM_RET_ERR_FAILED);
    }

 

And now less memory is used with 5.33, but still sligthly more as with 5.20:
Name    largest  free     used   total    start    end
IDRAM0, 0x27f78, 0x27f78,
0xb88, 0x28b00, 0x32c08, 0x5b707, 0

 

What is the reason for this behavior?

 

Thanks in advance!
T.Baria