首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 31 毫秒
1.
Memory leaks are usually not associated with runtime environments with automatic garbage collection; however, memory leaks do happen in such environments and present a challenge to detect and find a root cause. Currently in the industry manual heap dump analysis is the most popular way of finding memory leaks, regardless of the number of automated methods proposed by scientists over the years. However, heap dump analysis alone cannot answer all questions needed to fix the leak effectively. The current paper reviews memory leak detection approaches proposed over the years and classifies them from the point of view of assessed metrics, performance overhead and intrusiveness. In addition, we classify the methods into online, offline and hybrid groups based on their features.  相似文献   

2.
Java程序内存的低效使用是导致其性能问题的主要因素。该文分析了泄漏对象、蚍蜉对象和空闲对象3类导致内存低效使用的情况,探讨解决上述问题的方法,并提出构造对象行为模式。实验结果表明,该方案是有效的。  相似文献   

3.
为了在软件工程实践中有效利用运行时存储的空间,对动态堆内存管理的两种技术显式堆管理和自动堆管理分别进行了深入的讨论,分析了这两种技术各自的优点和缺陷,并根据笔者的实践经验,提出了一些解决缺陷的方法。  相似文献   

4.
Memory leaks are a continuing problem in the software developed with programming languages, such as C and C++. A recent approach adopted by some researchers is to tolerate leaks in the software application and to reclaim the leaked memory by use of specially constructed memory allocation routines. However, such routines replace the usual general‐purpose memory allocator and tend to be less efficient in speed and in memory utilization. We propose a new scheme which coexists with the existing memory allocation routines and which reclaims memory leaks. Our scheme identifies and reclaims leaked memory at the kernel level. There are some major advantages to our approach: (1) the application software does not need to be modified; (2) the application does not need to be suspended while leaked memory is reclaimed; (3) a remote host can be used to identify the leaked memory, thus minimizing impact on the application program's performance; and (4) our scheme does not degrade the service availability of the application while detecting and reclaiming memory leaks. We have implemented a prototype that works with the GNU C library and with the Linux kernel. Our prototype has been tested and evaluated with various real‐world applications. Our results show that the computational overhead of our approach is around 2% of that incurred by the conventional memory allocator in terms of throughput and average response time. We also verified that the prototype successfully suppressed address space expansion caused by memory leaks when the applications are run on synthetic workloads. Copyright © 2010 John Wiley & Sons, Ltd.  相似文献   

5.
提出了一个有效的C 内存泄漏检测方法.方法在分析内存泄漏的基础上,通过重新实现动态内存分配和释放函数,记录内存分配的确切位置并跟踪动态内存的使用情况.在程序结束时,方法利用跟踪结果检测和定位内存泄漏.最后,通过在Windows和Linux平台上的实验验证了本文方法的有效性.  相似文献   

6.
C语言作为安全关键软件的主要实现语言,其存在的内存泄漏缺陷具有很高的隐蔽性和危害性,如何保证内存泄漏检测的准确性和高效性是一大挑战。静态分析具有直接分析源码、能够较早发现软件错误,从而降低修复代价的优势。基于静态分析技术,提出了一种基于路径敏感的值流分析的内存泄漏检测方法,首先进行指针分析生成精确指向信息;然后基于指向信息构建值流约束,执行可达性分析以识别程序中的泄漏路径;最后借助指针与内存地址的有效生命周期进行验证。在典型基准C程序上的实验结果分析表明,本文方法与现有技术相比在效率和精度上都具有一定优势。  相似文献   

7.
冯涛  宋成明 《微机发展》2006,16(7):123-125
Java语言的一个显著特点是它通过虚拟机和垃圾回收机制管理着大部分的内存事务,但是在Java程序中还是可能存在内存泄漏问题。文中首先对Java内存泄漏做一个简要的定义,接着围绕一个实例详细地介绍如何用工具检测Java内存泄漏,最后列举了一些典型的泄漏,以便读者在Java程序开发中尽量避免类似的内存泄漏。  相似文献   

8.
Java程序内存行为研究是对Java平台存储管理系统进行能耗优化的首要工作.测试了大量典型Java应用程序的内存行为数据,通过对数据的分析发现Java程序的内存分配模式和内存使用轨迹存在明显的规律.最终得出了Java程序内存行为具有阶段性、周期性和平稳性等结论,这些规律对于Java虚拟机优化垃圾收集和Java程序的能耗优化有着重要的指导意义.  相似文献   

9.
Android应用程序的主体采用Java编程语言实现,Java语言的一个显著特点是它通过Java虚拟机和垃圾回收机制管理大部分的内存事务,但是在Java程序中不可避免地存在着内存泄漏的问题。本文从造成Android应用程序内存泄漏的原因入手,对内存泄漏进行检测和定位。阐述了在编写应用程序时规避内存泄漏的方法,并分别介绍了一种内存监测工具和一种内存分析工具的使用方法。  相似文献   

10.
One major problem of using Java in real-time and embedded devices is the non-deterministic turnaround time of dynamic memory management systems (memory allocation and garbage collection). For the allocation, the non-determinism is often contributed by the time to perform searching, splitting, and coalescing. For the garbage collection, the turnaround time is usually determined by the size of the heap, the number of live objects, the number of object collected, and the amount of garbage collected. Even with the current state-of-the-art garbage collectors (generational and incremental schemes), they may or may not guarantee the worst-case latency. Moreover, such schemes often prolong overall garbage collection time.

In this paper, the performance analysis of the proposed Active Memory Module (AMM) for embedded systems is presented. Unlike the software counterparts, the AMM can perform a memory allocation in a predictable and bounded fashion (14 cycles). Moreover, it can also yield a bounded sweeping time regardless of the number of live objects or heap size. By utilizing the proposed system, the overall speedup can be as high as 23% compared to the garbage collection system of the JDK 1.2.2 running in classic mode.  相似文献   


11.
This paper addresses the issue of improving the performance of memory management for real-time Java applications, building upon the real-time specification for Java (RTSJ) from the Real-Time Java Expert Group. In a first step, a collecting dynamic memory solution including both a real-time garbage collector and region-based memory management, is proposed. A thorough analysis of the parameters influencing the performance of write barriers in memory management, together with ways of improvement are then presented. Finally, the implementation of a memory management solution compliant with the RTSJ and integrating the proposed improvements is sketched.  相似文献   

12.
针对Android存储系统在闪存管理上存在较差的磨损均衡效果和较高的垃圾回收额外开销的缺陷,引入冷热数据分离策略,将文件按照不同热度写入对应热度的物理存储单元,同时改进垃圾回收策略,以达到良好的磨损均衡效果并减少垃圾回收额外开销。基于Android平台的实验结果表明,改进后的策略在有效减少NAND闪存垃圾回收额外开销的同时,还能有效改善其磨损均衡效果。  相似文献   

13.
英特尔于2019年4月正式发布基于3D-Xpoint技术的傲腾持久性内存(Optane DC persistent memory),这为构建高效的持久性内存存储系统提供了新的机遇.然而,现有的存储系统软件并不能很好地利用其字节寻址特性,持久性内存性能很难充分发挥.提出一种文件系统数据页的混合管理机制HDPM,通过选择性使用写时复制机制和日志结构管理文件数据,充分发挥持久性内存字节可寻址特性,从而避免了传统单一模式在非对齐写或者小写造成的写放大问题.为避免影响读性能,HDPM引入逆向扫描机制,实现日志结构重构数据页时不引入额外数据拷贝.HDPM还提出一种多重垃圾回收机制进行日志清理.当单个日志结构过大时,通过读写流程主动回收日志结构;当持久性内存空间受限时,则通过后台线程使用免锁机制异步释放日志空间.实验显示,HDPM相比于NOVA文件系统,单线程写延迟降低达58%,且读延迟不受影响;Filebench多线程测试显示,HDPM相比于NOVA提升吞吐率33%.  相似文献   

14.
持久性内存具有非易失性、可字节寻址、随机读写速度快、能耗低以及可扩展性强等优良特性,为大数据存储和处理提供了新的机遇.然而,持久性内存系统的故障一致性问题为其广泛推广应用带来挑战.现有一致性保证的研究工作通常以增加额外读写为代价,对持久性内存系统的性能和寿命在时间和空间维度产生了一定的影响.为了降低该影响,提出一种耐久性感知的持久性内存异地更新机制(endurance aware out-of-place update for persistent memory, EAOOP).通过软件透明的异地更新技术,为持久性内存提供耐久性感知的内存管理,将数据交替刷新至原始数据区域和更新数据区域.EAOOP既保证了系统的故障一致性,又避免了冗余的数据合并操作.同时,为了高效利用内存空间,在后台执行轻量级垃圾回收,处理更新数据区域的旧数据,减少了额外的写放大和带宽占用,从而进一步降低了对持久性内存寿命和性能的影响.实验显示,EAOOP相比于现有工作,具有更高的性能和更少的开销.其中,事务处理吞吐量提升了1.6倍,总线延迟和写数量分别减少了27.3%和32.4%.  相似文献   

15.
Memory leaks are recognized to be one of the major causes of memory exhaustion problems in complex software systems. This paper proposes a practical approach to detect aging phenomena caused by memory leaks in distributed objects Off-The-Shelf middleware, which are commonly used to develop critical applications. The approach, which is validated on a real-world case study from the Air Traffic Control domain, defines algorithms and ad hoc support tools to perform data filtering and to find the best trade off between experimentation time and statistical accuracy of aging trend estimates. Experiments show that fixing memory leaks is not always the key to solve memory exhaustion problems.  相似文献   

16.
C#是一种新的面向对象的程序设计语言,进一步研究C#程序设计的内存分配,就必须涉及.NET Framwork的概念,因为C#是专门为.NET Framework而设计的程序设计语言。本文主要叙述了C#和.NET程序设计中内存管理的特点和对程序设计性能的影响,并且就C#和传统的程序设计语言作了比较。  相似文献   

17.
分析Java的内存管理与垃圾收集机制.  相似文献   

18.
动态内存分配为C/C++语言编程人员提供了极大的灵活性,但同时也带来了一个潜在的严重问题——内存泄露。与桌面系统相比,嵌入式系统处理能力弱、内存空间小、运行时间长,如果在程序运行期间发生内存泄露,将导致系统崩溃,造成不可预料的后果,因此需要在开发调试阶段尽早检测出造成内存泄露的代码。提出了一种基于动态检测技术和程序插装技术的嵌入式软件内存泄露分布式检测方法。该方法的实现思想是当程序在目标机运行时,插装代码自动截获内存操作函数,收集内存操作相关信息并把收集到的信息发送到服务器端处理,实现了嵌入式系统内存泄露的准确检测。实验结果证明,由于采用分布式技术进行信息处理,内存泄露检测效率得到了很大的提升。  相似文献   

19.
谌宁  覃征 《计算机应用》2005,25(1):218-219
阐述了一种适用于嵌入式Java虚拟机的垃圾回收算法。该算法对分代回收算法中代的划分方式,引用跟踪等方面进行改进,以降低对运行时间和内存空间的需求,从而使其适用于资源有限的嵌入式环境。试验结果表明,该算法有效提高了垃圾回收效率。  相似文献   

20.
We propose the use of generations with modern reference counting. A reference counting collector is well suited to collect the old generation, containing a large fraction of live objects that are modified infrequently. Such a collector can be combined with a tracing collector to collect the young generation, typically containing a small fraction of live objects. We have designed such a collector appropriate for running on a multiprocessor. As our building blocks, we used the sliding‐views on‐the‐fly collectors. We have implemented the new collector on the Jikes Research Java Virtual Machine (Jikes RVM) and compared it with the concurrent reference counting collector supplied with the Jikes RVM package. Our measurements demonstrate short pause times, retaining those of the original on‐the‐fly collectors and a gain in application throughput time. It turns out that a modern reference counting collector may benefit from the use of generations. Copyright © 2006 John Wiley & Sons, Ltd.  相似文献   

设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号