Improving Application Efficiency Through Chip Multi-Threading
2.1.1.8 Multi-Threaded malloc
malloc and free are single-threaded operations and are among the bottlenecks for multi-threaded applications. A multi-threaded malloc scales with multi-threaded requests and can improve multi-threaded application performance. The Solaris OS has two types of multi-threaded malloc libraries, mt-malloc and umem.
2.1.1.8.1 Usage
a. Using mt-malloc:
LD_PRELOAD=libmtmalloc.so
b. Using libumem:
LD_PRELOAD=libumem.so
cc [ flag... ] file... -lumem [ library... ]
跟我的想法是一樣的,因為開矩陣還是需要很多時間的。
沒有留言:
張貼留言