---
title: "How will you find if your application is running on low memory, or out of memory?"  
description: "How will you find if your application is running on low memory, or out of memory?"  
author: "Shreyas singh"  
published: 2018-01-22  
canonical: https://answers.mindstick.com/qa/33369/how-will-you-find-if-your-application-is-running-on-low-memory-or-out-of-memory  
category: "technology"  
tags: ["android"]  
reading_time: 1 minute  

---

# How will you find if your application is running on low memory, or out of memory?

How will you find [if your](https://answers.mindstick.com/qa/108497/what-to-do-if-your-bluetooth-is-not-working) [application](https://www.mindstick.com/blog/59/xaml-extensible-application-markup-language) is running on low [memory](https://www.mindstick.com/blog/300050/what-causes-sudden-memory-loss), or out of memory?

## Answers

### Answer by Prateek sharma

To check for the **memory** simple run this periodically

Runtime.getRuntime().maxMemory();

Runtime.getRuntime().totalMemory();

Runtime.getRuntime().freeMemory();

it will show all the details such as maximum memory your app is taking or total memory your app acquires.

you can also override the following method to get the memory information -

@Override

public void onLowMemory() {

super.onLowMemory();

Log.w(TAG, "onLowMemory() -> clearImageCacheFu!!!");

clearImageCacheFu();

dispatchGoogleTracker();

stopGoogleTracker();

}


---

Original Source: https://answers.mindstick.com/qa/33369/how-will-you-find-if-your-application-is-running-on-low-memory-or-out-of-memory

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
