Hoard内存分配器的学习手记

准备工作

发现我膜拜的项目中竟然直接应用了hoard的代码555,所以拿来看看到底哪里厉害!

Hoard项目的官方网站在http://www.hoard.org/

它自己配了一部分英文简介,很容易看懂。

The Hoard memory allocator is a fast, scalable, and memory-efficient memory allocator for Linux, Solaris, Mac OS X, and Windows. Hoard is a drop-in replacement formalloc that candramatically improve application performance, especially for multithreaded programs running on multiprocessors and multicore CPUs. No source code changes necessary: just link it in or set one environment variable

另外,它提供了tar包的下载,不过不要选官网上的,到git-hub上clone一个最好,官网上的tar包有redefination错误。

 

简介

这个项目是出自于ASPLOS 2000年的一篇文章 Hoard: A Scalable Memory Allocator for Multithreaded Applications

为了更好理解,我大概看了一下文章。

Hoard: A Scalable Memory Allocator for Multithreaded Applications

摘要:

hoard就是一个为并行多线程C或者是C++程序设计的内存分配器。

之前为串行程序设计的串行分配器的扩展性不行,现有的并行分配器的性能不好,而且有的分配器对堆的管理会引入假共享(false sharing

Worse, many allocators exhibit a dramatic increase in memory consumption when confronted with a producer-consumer pattern of object allocation and freeing. This increase in memory consumption can range from a factor of P (the number of processors) to unbounded memory consumption.

这篇文章,自称 Hoard, a fast, highly scalable allocator that largely avoids false sharing and is memory efficient.

而且Hoard combines one global heap and per-processor heaps with a novel discipline that provably bounds memory consumption and has very low synchronization costs in the common case.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值