摘要
动态内存分配在现代程序中被广泛使用.通用的内存分配器通常关注于降低运行时开销和内存利用率,而在发掘所分配对象之间的特性方面有所欠缺.文中展示了一个低开销的动态优化技术"动态池分配".它在运行时构造存储形状图,从中发掘动态分配对象之间的亲缘性,把具有亲缘性的对象聚集到一段内存区域(称为内存池)里,改善了它们的数据布局.作者在实际机器上实现了动态池分配原型系统,并在GCC--O3编译的一些大量使用堆数据的SPEC 2000和2006程序上进行了测试.原型系统在两台实际机器上获得了13.1%和11.8%的平均加速比,对一些程序的加速高达82.2%.此外,作者还研究了CPU的高速缓存大小对池分配效果的影响.
Dynamic memory allocation is widely used in modern programs.General-purpose heap allocators often focus more on reducing their run-time overhead and memory space utilization,but less on exploiting the characteristics of their allocated heap objects.This paper presents a lightweight dynamic optimization technique,named Dynamic Pool Allocation(DPA),which generates Storage Shape Graph at run-time,and exploits the affinity of the allocated heap objects.It uses heuristics to aggregate affinitive heap objects into dedicated memory regions,called memory pools.The authors have implemented DPA and measured its performance on several SPEC CPU 2000 and 2006 benchmarks that use extensive heap objects.Evaluations show that it could achieve an average speed up of 13.1% and 11.8% on two x86 commodity machines respectively using GCC——O3,and up to 82.2% for some benchmarks.The authors also examined the impact of cache size to the effectiveness of pool allocation.
出处
《计算机学报》
EI
CSCD
北大核心
2011年第4期665-675,共11页
Chinese Journal of Computers
基金
国家自然科学基金(60736012)
国家自然科学基金创新群体(60921002)
工信部核高基重大专项(2009ZX01036-001-002)
国家"九七三"重点基础研究发展规划项目基金(2011CB302504)
国家"八六三"高技术研究发展计划项目基金(2007AA01Z110)资助
关键词
池分配
变长调用链
亲缘性
数据布局
动态优化
pool allocation
adaptive partial call chain
affinity
data layout
dynamic optimization