Quantcast
Channel: Processors
Viewing all articles
Browse latest Browse all 125344

Forum Post: RE: Utils_memAlloc_cached() cost too much time

$
0
0

What RDK is this ? I don't see such an API in DVR RDK. Anyhow alloc and free should take insignificant time essentially. Utils_memAlloc does memset of the allocated memory if

gUtils_memClearBuf[<heap_id>] is set to TRUE (by default it is set to TRUE).

First try setting it to FALSE in

/dvr_rdk/mcfw/src_bios6/utils/src/utils_mem.c

Int32 Utils_memClearOnAlloc(Bool enable)
{
    UInt32 i;

    for (i=0; i<UTILS_MEM_NUM_SHARED_REGION_HEAP; i++)
    {
        gUtils_memClearBuf[i] = FALSE;
    }
    return 0;
}

This will confirm if the time taken is due to clearing memory. Even so Utils_memFree will not take any time unless some Cache operation is done on the freed memory.

If you still see large time even after disabling memory clear it means alloc/free is itself taking lot of time which can happen only if there is contention for the GateMP lock when trying to allocate or free memory.

 


Viewing all articles
Browse latest Browse all 125344

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>