问题描述
我需要一些快速的,线程安全的内存池库。
我GOOGLE了很多,但快速的解决方案不具备线程安全的,而有些则是非常大的。
I need some fast, thread safe memory pooling library.I've googled a lot, but fast solutions don't have thread safety, while others are really big.
有什么建议?
推荐答案
这两个nedmalloc和ptmalloc都是基于C线程缓存的内存管理器,根据各地Doug Lea的malloc的(大多数Linux分配器的核心)。他们都是在良好的许可证为好,不像储备,这就需要用于商业用途支付,最后我看了。谷歌tcmalloc也有C绑定IIRC,是从根本上为线程缓存分配,以及一些内置的堆和CPU性能分析工具,它可是打造海量内存使用(他们给出的例子是每线程300MB +内置),因此许多没有工作,以及预期的规模较小的应用
Both nedmalloc and ptmalloc are C based thread caching memory managers, based around doug lea's malloc(the core of most linux allocators). They are both under good licences as well, unlike hoard, which requires payment for commercial use, last I looked. Googles tcmalloc also has C bindings iirc, and is built from the ground up as a thread caching allocator, as well as some built in heap and cpu profiling tools, it is however build for massive memory usage(the example they give is 300mb+ per thread), and as such many not work as well as expected for smaller scale apps
这篇关于C:内存池库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!