首页> 外文期刊>Software >LeakSpot: detection and diagnosis of memory leaks in JavaScript applications
【24h】

LeakSpot: detection and diagnosis of memory leaks in JavaScript applications

机译:LeakSpot:检测和诊断JavaScript应用程序中的内存泄漏

获取原文
获取原文并翻译 | 示例
           

摘要

The migration of application logic to the client side of modern web applications and the use of JavaScript as the main language for client-side development have made memory leaks in JavaScript an issue for web applications. Client-side web applications communicate with the server asynchronously, remaining on the same web page during their lifetime. Thus, even minor memory leaks can eventually lead to excessive memory usage, negatively affecting user-perceived response time and possibly causing page crashes. To detect memory leaks and guide developers in fixing the leaks quickly and easily, this paper introduces LeakSpot, a tool that creates a run-time heap model by modifying the application code in a browser-agnostic way to record object allocations, accesses, and references created to objects. LeakSpot reports those allocation sites causing the leaks instead of all the leaky allocation sites. It also identifies the locations in the code where leaked objects are accumulated, for example, the locations where a reference from a data structure is created but forgotten to be removed by the developer. To facilitate debugging and fixing the leaks, for every leaked object, LeakSpot reports all the locations in the code that create a reference to the object. To confirm usefulness and efficacy of LeakSpot experimentally, we have used LeakSpot to find and fix four memory leaks in a JavaScript benchmark suite and in open-source web applications. LeakSpot is also shown to be effective in pointing out the potential causes of three leaks in large and popular web applications. Copyright (c) 2016 John Wiley & Sons, Ltd.
机译:应用程序逻辑向现代Web应用程序的客户端的迁移以及JavaScript作为客户端开发的主要语言的使用已使JavaScript中的内存泄漏成为Web应用程序的一个问题。客户端Web应用程序与服务器异步通信,并在其生存期内保留在同一网页上。因此,即使很小的内存泄漏也可能最终导致过多的内存使用,对用户感知的响应时间产生负面影响,并可能导致页面崩溃。为了检测内存泄漏并指导开发人员快速轻松地修复泄漏,本文介绍了LeakSpot,该工具可通过与浏览器无关的方式修改应用程序代码来创建运行时堆模型,以记录对象分配,访问和引用创建到对象。 LeakSpot报告导致泄漏的分配站点,而不是所有泄漏的分配站点。它还标识代码中泄漏对象累积的位置,例如,创建数据结构中的引用但被开发人员忘记删除的位置。为了便于调试和修复泄漏,对于每个泄漏的对象,LeakSpot会报告代码中所有创建该对象引用的位置。为了通过实验确认LeakSpot的有用性和有效性,我们使用LeakSpot在JavaScript基准测试套件和开源Web应用程序中查找并修复了四个内存泄漏。 LeakSpot还被证明可以有效指出大型流行Web应用程序中三处泄漏的潜在原因。版权所有(c)2016 John Wiley&Sons,Ltd.

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号