1

i'am a little concerned about the Memory usage of my app. For the following scenario i created a completely new Project. The MainActivity just sets the ContentView.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
}

So... i have a simple login layout enter image description here enter image description here

which has a Memory usage of nearly 100mb!? enter image description here

all ImageView's dont contain any Images. They just have a static color (i.e. the light blue).

But is a memory usage of 100mb normal? Or am i missing out on something? Thank you for you're time and help!

4

1 Answer 1

6

I think it is normal. It is not eating 100MB of RAM actually. On new Android Monitor of AS3 numbers are a bit different than previous AS2. In the user guide here, it is written:

When compared to memory counts from the previous Android Monitor tool, the new Memory Profiler records your memory differently, so it might seem like your memory use is now higher. The Memory Profiler monitors some extra categories that increase the total, but if you only care about the Java heap memory, then the "Java" number should be similar to the value from the previous tool.

And although the Java number probably doesn't exactly match what you saw in Android Monitor, the new number accounts for all physical memory pages that have been allocated to your app's Java heap since it was forked from Zygote. So this provides an accurate representation of how much physical memory your app is actually using.

Currently, the Memory Profiler also shows some false-positive native memory usage in your app that actually belongs to the profiling tools. Up to 10MB of memory is added for ~100k objects. In a future version of the tools, these numbers will be filtered out of your data.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.