可视化动态内存分配外文翻译资料

 2022-01-29 06:01

英语原文共 8 页,剩余内容已隐藏,支付完成后下载完整资料


Visualizing Dynamic Memory Allocations

可视化动态内存分配

Abstract摘要

We present a visualization tool for dynamic memory allocation information obtained from instrumenting the runtime allocator used by C programs. The goal of the presented visualization techniques is to convey insight in the dynamic behavior of the allocator. The purpose is to help the allocator designers understand how the performance and working of the allocator depend on the actual allocation scenarios in order to optimize its functionality by decreasing fragmentation and improving response time. We use an orthogonal dense pixel layout of time versus memory space which can show tens of thousands of allocation events on a single screen. We enhance the basic idea with several new techniques: antialiased metric bars for detecting high and low activity areas; cushion cursors for checking correlations of multiple views; and a view to show correlation between program structure (functions) and memory allocations. The presented techniques are demonstrated on data from a real application.

我们提供了一个用于监测从C语言程序所使用的运行时分配器中获得动态内存分配信息的可视化工具。这个可视化技术的目标是监测分配器的动态行为。目的是帮助分配器设计者理解分配器的性能和工作如何依赖于实际的分配方案,以便通过减少碎片来优化其功能并改善响应时间。我们使用时间与内存空间的正交密集像素布局,可在单个屏幕上显示数万个分配事件。我们通过几种新技术增强了基本思想:用于检测高活动区域和低活动区域的抗锯齿公制条;缓冲光标,用于检查多个视图的相关性;显示程序结构(函数)和内存分配之间的相关性的视图。所呈现的技术在实际应用的数据上得到了证明。

1 Introduction

Dynamic memory allocators are an important component of the runtime support of virtually all programming languages. Such allocators are responsible for providing memory blocks on the heap upon requests from the application, as offered by the mal loc C function and new C operator. When the memory is not needed any longer, the allocated blocks are returned to the runtime, either via explicit calls to free (C) or delete (C ) or via garbage collection mechanisms, such as in Java. The design of an efficient memory allocator is of crucial importance for the performance of modern software.

动态内存分配器是几乎所有编程语言运行时支持的重要组成部分。这些分配器根据应用程序的请求在堆上提供内存块,如C语言的malloc函数和C 的new运算符。当不再需要内存时,通过显式调用free(C)或delete(C )或通过垃圾收集机制(如Java)将分配的块返回给运行时。高效的内存分配器的设计对于现代软件的性能至关重要。

Several performance metrics are relevant in this context. First, the allocator should minimize memory fragmentation, i.e. the amount of non-contiguous free memory blocks. This reduces the chance that an allocation request will fail when the free memory is split into many small blocks interleaved with allocated blocks. Second, the allocator should minimize the waste, i.e. the amount of memory used for internal management which is not made available to applications. Waste can occur e.g. when only fixed-size blocks are allocated, in which case it is also known as internal fragmentation. Third, the allocator should provide a good response time for both allocation and free requests for a wide mix of scenarios, e.g. concurrent allocating processes, different block sizes, and request frequencies. In practice, the performance of a memory allocator is measured by logging data on such metrics from an instrumented allocator. The data is next analyzed and the allocator strategy and parameters are tuned accordingly.

下文有几个相关的性能指标。首先,分配器应该最小化存储器碎片,即非连续空闲存储器块的数量。当空闲内存分成与已分配块相结合的小块时,会降低分配请求失败的可能性;其次,分配器应尽量减少浪费,即用于内部管理的不适用于应用程序的部分。当只分配固定大小的块时,就可能会产生浪费,在这种情况下它也称为内部碎片;第三,分配器应为大量分配和释放请求混合的情景提供良好的响应时间,例如:并发分配进程,不同的块大小和请求频率。实际上,内存分配器的性能是通过以已检测到的分配器的日志数据来衡量的。接下来分析数据并相应地调整分配器策略和参数。

However, understanding log data to detect sub-optimal performance and when and why this occurs is difficult. Typical logs can easily contain hundreds of thousands of high-frequency events. Detecting patterns and correlations in such logs is a daunting task, especially if one does not know what to look for exactly. For example, the total allocated memory is a simple to measure metric which can be monitored by a single numeric value. However, understanding fragmentation patterns is much more difficult.

但是,了解日志数据以检测次优性能以及何时、为何发生这种情况很困难。典型的日志很容易包含数十万个高频事件。检测此类日志中的模式和相关性是一项艰巨的任务,尤其是如果不知道要查找的内容。例如,总的分配内存是一个易于衡量的指标,可以通过单个数值监控。但是,了解碎片要困难得多。

A different use of analyzing dynamic memory allocator patterns is for studying the behavior of a given program. Incorrect or inefficient behavior can be hard to quantify in concrete queries or metrics, but can be spotted by seeing memory usage patterns. Examples are finding incorrect allocation/deallocation sequences which could lead to memory leaks, dangling pointers, or uninitialized memory reads. Such analyses can be conducted by using automated tools such as Purify [10]. Yet, a visual presentation can be easier to follow, and can show trends leading to potential problems, whereas automated analysis typically detects only #39;hard#39; errors.

分析动态内存分配器模式的不同用途是用于研究给定程序的行为。在具体的查询或指标中难以量化不正确或低效的行为,但可以通过查看内存使用模式来发现。示例找到可能导致内存泄漏,空指针或未初始化内存读取的不正确的分配/释放序列。可以使用Purify[10]等自动化工具进行此类分析。然而,视觉呈现可以更容易理解,并且可以显示导致潜在问题的趋势,而自动分析通常仅检测“硬”错误。

In this paper, we present an approach for the visual analysis of the behavior of dynamic memory allocators. Our log data is a weakly structured dataset containing hundreds of thousands of (de)allocation events. We use a simple, yet effective visualization able to display tens of thousands of events on a single screen and antialiasing to emphasize high activity areas. We extend and specialize these core techniques, introduced by us in [8], to get more insight from memory allocations, as follows. We use a new antialiasing to render occupancy metric bars to support separating high from low activity areas (Sec. 4.1.3). We use a new layout to correlate memory visualizations along the address and/or time dimensions; besides allocation metrics, we also show information on the allocating functions; finally, we enhance the correlated views with a new interactive technique, called cushion cursors (Sec. 4.1.4). We demonstrate our techniques by answering several concrete questions on allocation data collect

全文共34396字,剩余内容已隐藏,支付完成后下载完整资料


资料编号:[227],资料为PDF文档或Word文档,PDF文档可免费转换为Word

原文和译文剩余内容已隐藏,您需要先支付 30元 才能查看原文和译文全部内容!立即支付

以上是毕业论文外文翻译,课题毕业论文、任务书、文献综述、开题报告、程序设计、图纸设计等资料可联系客服协助查找。