P4080DS: EGLIBC is slow

cancel
Showing results for 
Search instead for 
Did you mean: 

P4080DS: EGLIBC is slow

199 Views
sharathchandra
Contributor II

Hi,

I am using a P4080DS board for my C++ application. My application does high amount of memory related operations(mainly memcpy, memset, malloc and free) , which is taking lot of CPU.

Does eglibc do lot of disk operations, rather than utilizing the physical memory, because of which it is taking lot of CPU?

Is optimizing eglibc helps?

Are there any ways to improve performance of memory intensive operations?

Thanks,

Sharath Chandra

Labels (1)
0 Kudos
1 Reply

81 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Sharath Chandra,

Glibc uses multipe memory pools that malloc can allocate memory from. Especially for multi thread programs, using mutiple memory pools can speed up memory allocation and improve overall performance. The application developer could tune application performance by adjusting the environment variable M_ARENA_MAX, choosing a value is a tradeoff between performance and memory consumption, higher memory use could gives the better performance.

You could refer to libc/malloc/malloc.c(arena.c) in eglibc for detailed information.


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos