PhD seminar - Masoomeh Rudafshani

Thursday, December 11, 2014 10:00 am - 10:00 am EST (GMT -05:00)

Candidate

Masoomeh Rudafshani

Title

Finding and Fixing Memory Leaks in JavaScript Applications

Supervisor

Paul Ward

Abstract

While the memory leak problem has been addressed in the context of many programming languages, it has not been well studied for JavaScript; which is the main programming language in the browsers. Client-side web applications communicate with the server asynchronously, remaining on the same web-page during their lifetime. Thus, even minor memory leaks may lead to excessive memory usage, negatively affecting user-perceived response time and possibly causing program failures, especially on devices with limited resources.

In this seminar, we introduce LeakSpot, a tool that creates a heap model by modifying web-application code, in a browser-agnostic way, to record object allocations, accesses, and references created for an object. It monitors accesses to the objects to determine objects' staleness (time since last use) and combines this information with allocations or reference creation points on the objects to determine leaked objects. To facilitate debugging and fixing the leaks, LeakSpot reports the allocation sites of the leaked memory, last use sites, and the locations in the program that created a reference on objects (potential references which prevents the objects from being released). We have used LeakSpot to find and fix memory leaks in JavaScript benchmarks and open source web applications. In addition, we have identified potential memory leaks in popular web applications and pinpointed the possible source of those leaks.