Abstract

Memory leaks represent a remarkable problem for mobile app developers since a waste of memory due to bad programming practices may reduce the available memory of the device, slow down the apps, reduce their responsiveness and, in the worst cases, they may cause the crash of the app. A common cause of memory leaks in the specific context of Android apps is the bad handling of the events tied to the Activity Lifecycle. In order to detect and characterize these memory leaks, we present FunesDroid, a tool-supported black box technique for the automatic detection of memory leaks tied to the Activity Lifecycle in Android apps. FunesDroid implements a testing approach that can find memory leaks by analyzing unnecessary heap object replications after the execution of three different sequences of Activity Lifecycle events. In the paper, we present an exploratory study that shows the capability of the proposed technique to detect memory leaks and to characterize them in terms of their size, persistence and growth trend. The study also illustrates how memory leak causes can be detected with the support of the information provided by the FunesDroid tool.

Highlights

  • The number of users of mobile technology and smartphones is steadily growing and has surpassed 3 billion in november 2019.1 Introduced by Google in 2007, Android is today the world’s most popular mobile operating system

  • To overcome some limitations of existing approaches, in this paper we propose a technique that automates the detection of the specific category of memory leaks in Android apps that are tied to the Android Activity lifecycle

  • A possible memory leak scenario involving AsyncTasks that we found in our study is the following: an Activity instantiates and starts an AsyncTask that keeps a reference to the Activity

Read more

Summary

INTRODUCTION

The number of users of mobile technology and smartphones is steadily growing and has surpassed 3 billion in november 2019.1 Introduced by Google in 2007, Android is today the world’s most popular mobile operating system. Since memory leaks are usually due to bad programming practices that negatively impact the app’s memory usage, several source code static analysis approaches have been proposed in the literature to detect possible root causes of Android memory leaks [15], [19]–[22]. The effectiveness of these approaches depends on their capability to trigger program executions that cause memory leaks Often they require the source code instrumentation and, they are not applicable when the app code is not available or the Android version is not supported by the tool. When the source code is available, the information provided by the tool can be exploited to aid the developer in finding the root causes of the observed leaks We used this technique to analyze 283 real Android apps in order to assess the FunesDroid capability in detecting potential memory leaks in real Android apps.

BACKGROUND
EXPLORATORY STUDY
SECOND EXPLORATORY STUDY
OBJECTS
VARIABLES AND METRICS
EXPERIMENTAL PROCEDURE
RELATED WORK
Findings
CONCLUSION
Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call