首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到19条相似文献,搜索用时 156 毫秒
1.
Java程序内存泄漏综述*   总被引:1,自引:0,他引:1  
从与C/C++内存泄漏对比的角度分析了Java内存泄漏问题,详细介绍了Java内存泄漏的相关研究和工具,探讨了当前研究和工具中存在的不足并分析了其原因,总结了内存泄漏相关领域研究的发展趋势。  相似文献   

2.
稳定性是衡量软件系统质量的重要指标,内存泄漏是破坏系统稳定性的重要因素。由于采用垃圾回收机制,Java语言的内存泄漏的模式与C 等语言相比有很大的不同。全文通过与C 中的内存泄漏问题进行对比,讲述了Java内存泄漏的基本原理,以及如何借助Optimizeitprofiler工具来测试内存泄漏和分析内存泄漏的原因,在实践中证明这是一套行之有效的方法。  相似文献   

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

4.
C程序内存泄漏智能化检测方法   总被引:1,自引:1,他引:0  
内存泄漏在采用显式内存管理机制的C语言中是一种常见的代码缺陷,内存泄漏的检测方法目前主要是静态分析与动态检测.动态检测开销大,且高度依赖测试用例;静态分析目前被学术界和工业界广泛应用,但是存在大量误报,需要人工对检测结果进行确认.内存泄漏静态分析的误报通常是由于对指针、分支语句和全局变量分析的不准确性导致的.提出了一种内存泄漏的智能化检测方法,通过使用机器学习算法学习程序特征与内存泄漏之间的相关性,构建机器学习分类器,并应用机器学习分类器进一步提高内存泄漏静态分析的准确性.首先构建机器学习分类器,然后通过静态分析方法构建从内存分配点开始的Sparse Value Flow Graph(SVFG),并从中提取内存泄漏相关特征,再使用规则和机器学习分类器进行内存泄漏的检测.实验结果显示,该方法在分析指针、分支语句和全局变量时是有效的,能够提高内存泄漏检测的准确性,降低内存泄漏检测结果的误报.最后,对未来研究的可行性以及面临的挑战进行了展望.  相似文献   

5.
就Symbian OS电话来说,内存常常是一种比较贫乏的资源。所以节省内存,防止泄漏对Symbian OS应用程序来说就是至关重要的事情了。本文介绍了如何在Symbian OS上使用C 标准库的auto_ptr 工具。  相似文献   

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

7.
内存泄漏是C/C++程序的一种常见的、难以发现的缺陷,一直困扰着软件开发者,尤其是针对长时间运行的程序或者系统软件,内存泄漏的后果十分严重.针对内存泄漏的检测,目前主要有静态分析和动态测试两种方法.动态测试实际运行程序,具有较大开销,同时依赖测试用例的质量;静态分析技术及自动化工具已经被学术界和工业界广泛运用于内存泄漏缺陷检测中,然而由于静态分析采取了保守的策略,其结果往往包含数量巨大的误报,需要通过进一步人工确认来甄别误报,但人工确认静态分析的结果耗时且容易出错,严重限制了静态分析技术的实用性.本文提出了一种基于混合执行测试的静态内存泄漏警报的自动化确认方法.首先,针对静态分析报告的目标程序中内存泄漏的静态警报,对目标程序进行控制流分析,并计算警报的可达性,形成制导信息;其次,基于警报制导信息对目标程序进行混合执行测试;最后,在混合执行测试过程中,监控追踪内存对象的状态,判定内存泄漏是否发生,对静态警报进行动态确认并分类.实验结果表明该方法可以对静态内存泄漏警报进行有效的分类,显著降低了人工确认的工作量.实验详情参见:http://ssthappy.github.io/memleak/.  相似文献   

8.
冯涛  王海源 《福建电脑》2006,(3):82-82,93
java语言的一个显著特点是它通过java虚拟机和垃圾回收机制管理着大部分的内存事务,但是在java程序中还是可能存在内存泄漏问题:避免内存泄漏的关键,就是要了解它发生的原因。本文首先分析导致java内存泄漏的原因,然后介绍一个检测内存泄漏的工具及其应用,文章的最后介绍一些典型的泄漏。使其在软件开发中起到抛砖引玉的作用。以便读者在java程序开发中尽量避免内存泄漏。  相似文献   

9.
java语言的一个显著特点是它通过java虚拟机和垃圾回收机制管理着大部分的内存事务,但是在java程序中还是可能存在内存泄漏问题;避免内存泄漏的关键,就是要了解它发生的原因。本文首先分析导致java内存泄漏的原因,然后介绍一个检测内存泄漏的工具及其应用,文章的最后介绍一些典型的泄漏,使其在软件开发中起到抛砖引玉的作用,以便读者在java程序开发中尽量避免内存泄漏。  相似文献   

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

11.
Compiler Hacking for Source Code Analysis   总被引:1,自引:0,他引:1  
Many activities related to software quality assessment and improvement, such as empirical model construction, data flow analysis, testing or reengineering, rely on static source code analysis as the first and fundamental step for gathering the necessary input information. In the past, two different strategies have been adopted to develop tool suites. There are tools encompassing or implementing the source parse step, where the parser is internal to the toolkit, and is developed and maintained with it. A different approach builds tools on the top of external already-available components such as compilers that output the program abstract syntax tree, or that make it available via an API.This paper discusses techniques, issues and challenges linked to compiler patching or wrapping for analysis purposes. In particular, different approaches for accessing the compiler parsing information are compared, and the techniques used to decouple the parsing front end from the analysis modules are discussed.Moreover, the paper presents an approach and a tool, XOgastan, developed exploiting the gcc/g++ ability to save a representation of the intermediate abstract syntax tree. XOgastan translates the gcc/g++ dumped abstract syntax tree format into a Graph eXchange Language representation, which makes it possible to take advantage of currently available XML tools for any subsequent analysis step. The tool is illustrated and its design discussed, showing its architecture and the main implementation choices made.  相似文献   

12.
It is increasingly difficult for complex scientific programs to attain a significant fraction of peak performance on systems that are based on microprocessors with substantial instruction-level parallelism and deep memory hierarchies. Despite this trend, performance analysis and tuning tools are still not used regularly by algorithm and application designers. To a large extent, existing performance tools fail to meet many user needs and are cumbersome to use. To address these issues, we developed HPCVIEW—a toolkit for combining multiple sets of program profile data, correlating the data with source code, and generating a database that can be analyzed anywhere with a commodity Web browser. We argue that HPCVIEW addresses many of the issues that have limited the usability and the utility of most existing tools. We originally built HPCVIEW to facilitate our own work on data layout and optimizing compilers. Now, in addition to daily use within our group, HPCVIEW is being used by several code development teams in DoD and DoE laboratories as well as at NCSA.  相似文献   

13.
C. R. Snow 《Software》1978,8(5):585-599
A project is described in which the software tools of Kernighan and Plauger1 are implemented on a Burroughs B1700 computer under a non-standard operating system. A command language interpreter similar to that of the UNIX operating system has also been implemented to provide an environment in which the tools may be used. The project was completed by five first-year postgraduate students in the remarkably short time of approximately 12 man-weeks. A translation program for the tools is described, together with some of the associated software required to support them.  相似文献   

14.
Dick Hamlet 《Software》1995,25(4):347-371
Testing tools are software analyzers that use information from particular executions of a program as well as information about a specification and the program text itself. Research prototypes of such tools are essential to investigate the ideas they embody. Often, hand calculation is so tedious and error-prone that an investigator cannot obtain any intuition about his or her ideas without an implementation to aid in experiments. Traditionally, such tools have been implemented in conventional high-level languages (e.g., C, Pascal), a process that takes more time than a prototype should. The technology of compiler generators and logic programming, applied to the idea of self-instrumenting programs, drastically shortens the prototype cycle. This paper describes a general method for implementing prototype tools, gives examples of several old and new testing techniques fitted into the method, and discusses the ease with which such prototypes may be changed.  相似文献   

15.
针对已有的使用单个静态检测工具进行源代码安全缺陷检测存在的漏报率和误报率很高的问题,提出了一种基于多种静态检测工具的检测方法。该方法通过对多种工具的检测结果进行统计分析,有效地降低了漏报率和误报率。设计和实现了一个可扩展的源代码静态分析工具平台,并通过实验表明,相对于单个工具的检测结果而言,该平台明显降低了漏报率和误报率。  相似文献   

16.
内存泄漏是软件开发中的一个难以定位和修正的严重错误。在大多数情况下,动态内存的有效域虽未明确写出,但仍是程序的局部;且程序动态运行的轨迹在一定程度上反映程序的静态性质。基于以上观察,开发了在面向函数定位框架中嵌入动态分析的内存泄漏监测新方法。新方法中,先建立程序的函数动态调用树,其中包含程序分配释放内存的信息,再在调用树中总结程序的静态性质,为内存泄漏定位提供有价值的信息。该文用两个实例展示这个方法的有效性。  相似文献   

17.
With the technology advances it becomes feasible to implement a large multiprocessor system on a single chip. In such Systems-on-Chip (SoCs), a significant portion of energy is spent in the memory subsystem. There are several approaches reducing this energy, including the ones at physical, architecture and algorithmic levels. Classical approaches, including algorithmic and some architectural approaches, use static analysis and transformation of the application source code. However, often it is not possible to perform static analysis and optimization of a program’s memory access behavior unless the program is written in an easily analyzable form, e.g., free from pointer arithmetic. In this paper, we introduce the FORAY model of a program that allows aggressive analysis of the application’s memory behavior and enables such optimizations on arbitrary code which are not possible to apply otherwise. We then present FORAY-GEN: an automated profile-based approach for extraction of the FORAY model from the original program. We also outline our approach in applying FORAY-GEN for multiprocessor SoCs. We demonstrate how FORAY-GEN enhances applicability of other memory subsystem optimization approaches, resulting in an average of two times increase in the number of memory references that can be analyzed by existing static approaches.  相似文献   

18.
We describe a collection of software tools that analyse and transform Fortran programs. The analysis tools detect parallelism in blocks of code and are primarily intended to aid in adapting existing programs to execute on multiprocessors. The transformation tools are aimed at eliminating data dependencies, thereby introducing parallelism, and at localizing arithmetic in registers, of primary interest in adapting programs to execute on machines that can be memory bound (common for machines with vector architecture). The tools are unified conceptually by their use of a set of conditions for data independence; these conditions have been implemented so as to combine tool analysis with user/tool interaction. We include timing results from applying the tools to programs intended for execution on two machines with different architectures — a Sequent Balance and a CRAY-2. The tools are written in Fortran in the tool-writing environment provided by Toolpack and are easily incorporated into a Toolpack installation.  相似文献   

19.
针对如何降低静态检测工具的误报率、漏报率和重报率这些问题,本文研究设计一个基于静态检测工具的软件缺陷检测模型。该模型通过对不同的静态检测工具的检测结果进行多级处理,有效地降低误报率、漏报率和重报率。最后,将两种静态检测工具应用于该模型,对开源软件NMap进行缺陷检测,实验结果表明该模型的有效性和实用性。  相似文献   

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

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