Extended Memory Reuse: An Optimisation for Reducing Memory Allocations
Extended Memory Reuse: An Optimisation for Reducing Memory Allocations
复制标题
扩展内存重用:减少内存分配的优化
DOI:
--
复制
发表时间:
2018
期刊:
影响因子:
--
通讯作者:
S. Scholz
中科院分区:
文献类型:
--
作者:
Hans;Artjoms Šinkarovs;S. Scholz
In this paper we present an optimisation for reference counting based garbage collection. The optimisation aims at reducing the total number of calls to the heap manager while preserving the key benefits of reference counting, i.e. the opportunities for in-place updates as well as memory deallocation without global garbage collection. The key idea is to carefully extend the lifetime of variables so that memory deallocations followed by memory allocations of the same size can be replaced by a direct memory reuse. Such memory reuse turns out particularly useful in the context of innermost loops of compute-intensive applications. It leads to a runtime behaviour that performs pointer swaps between buffers in the same way it would be implemented manually in languages that require explicit memory management, e.g. C. We have implemented the proposed optimisation in the context of the Single-Assignment C compiler tool chain. The paper provides an algorithmic description of our optimisation and an evaluation of its effectiveness over a collection of benchmarks including a subset of the Rodinia benchmarks and the NAS Parallel Benchmarks. We show that for several benchmarks with allocations within loops our optimisation reduces the amount of allocations by a few orders of magnitude. We also observe no negative impact on the overall memory footprint nor on the overall runtime. Instead, for some sequential executions we find mild improvement, and on GPU devices we observe speedups of up to a factor of 4x.
DOI:
10.1145/2774959.2774962
发表时间:
2015
期刊:
--
影响因子:
--
作者:
Bernecky R
通讯作者:
Bernecky R