P4080DS: EGLIBC is slow

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

P4080DS: EGLIBC is slow

355 次查看
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

标签 (1)
0 项奖励
1 回复

237 次查看
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 项奖励